PETER GOODE
THE
AMSTRAD
PROGRAM BOOK
THE
AMSTRAD
PROGRAM BOOK
PETER GOODE
Phoenix Publishing Associates Ltd
Bushey, Herts.
Copyright© Peter Goode 1984
All rights reserved
First published in Great Britain in 1984 by
PHOENIX PUBLISHING ASSOCIATES LTD
14 Vernon Road, Bushey, Herts. WD2 2JL
ISBN 0 9465 7624 6
Printed in Great Britain by
Billing & Sons Limited, Worcester
Cover design by
IvorClaydon
Typesetting by
Prestige Press (UK) Ltd.
Chesham, Bucks.
Illustrations by
Denis Gibney
Chorleywood, Herts.
PREFACE
If you are an Amstrad owner, or are about to become one, it is
probably because you have decided that this computer offers
you more potential for gaming, programming etc. in colour,
with sound, than other machines on the market.
Because we are aware of the potential of the Amstrad we have
written a wide choice of program which make use of the
computer's facilities.
If you are a games player, you will find ample opportunity to
use the colour and graphics whilst testing your reactions and
finger twisting skills to the full. If you are interested in
adventure gaming we have included a program which is a
variant on Dragons and Dungeons. We have not, for reasons
of space, been able to list a fully extended program but, when
you buy your disks, you will be able to use a wider range of
circumstances for your adventuring.
To help users understand the programs we have included full
'how to' instructions and, for those who are keen to move on
to greater things, programming hints where we feel they may
be of interest.
CONTENTS
Important notes 8
1 Zombie Island 9
2 Clear Path 13
3 Castle Adventure 17
4 Minefield 28
5 Asteroid Storm 32
6 Wordgrams 35
7 Driving Test 38
8 Space Trek 41
9 Dragon Dungeon 49
10 Sniper 59
11 Warplan 62
12 S.I.M.P.E.R 68
13 Wordsquare 74
14 FastTyper 79
15 Cubist Conundrums 82
16 Wipe Off 84
17 First One 87
18 Weightlifter 90
19 Kaleidoscope 95
20 Zombie Maze 97
21 Pontoon 102
22 Morse Encoder 107
23 Safecracker 110
24 Biorythm Graphing and Prediction 114
25 Dice 118
26 HunttheDay 123
27 Wallbreaker 126
28 Technical Artist 131
29 Spider 134
30 Double Surround 139
31 Snaker 142
IMPORTANT NOTES
If you are a newcomer to computing, and are unfamiliar with
the task of entering program listings, remember that it is of
paramount importance to follow every detail. There are no
real shortcuts.
Your computer is very particular about grammar and
punctuation points and will not run the programs if even a
small detail is missing.
Be very fussy about the difference between 0 (zero) and □
(letter O). All the programs in this book have been printed
directly from the Amstrad and are therefore 'bug free'.
If you intend to 'save' some of these programs on tape to
ensure you don't have to retype them always make sure that
your cassette has accepted the information before you move
on.
You will find that patience is it's own reward in this high
technology world.
ZOMBIE ISLAND
This is going to be a nasty experience for those amongst you
who are slow on reaction time.
You are the only survivor of the mad professor's plans to turn
humans into zombies and you are being pursued by ten of
your old friends who now, unfortunately, have been 'de-
humanised'. Your only hope is to lure the zombies into the
pits which are spread around the screen. Sounds easy. There
is one snag though, or is it several snags, the zombies can
move in groups towards you.
How to play
As we said above, try and live as long as possible by moving
with the arrow keys or joystick. If you survive you will be
offered the choice of continuing to battle with your former
pals.
10
Because of the sprite facilities of the Amstrad you will find that
the chances of survival are fairly slim.
The program
10
REM ZOMBIE ISLAND
20
GOSUB 520
30
N=10:PIT=10
40
Z=N
50
MODE 1: BORDER 3
60
PAPER 3: PEN OsLOC
:ATE 1, Is PRINT"
ZOMBIE ISLAND " s
70 X=21:Y=1 9: LOCATE X,Y: PAPER OsPEN 1 s PR
INT CHR* (249) ;
SO DIM A(N) , B(N> : FOR L=l TO M
90 A (L) =INT (RND i 1 ) #40+1 ) : B <|_> = IIMT (RND ( 1 )
*23+2)
1 00 X X=A ( L ) : YY=B ( L ) : 60SUB 660 : I F DD< >32
THEN GOTO 90
110 LOCATE XX„YY:PEN 2 5 PR I NT CHR*<225);
120 NEXT L
130 FOR L=l TO PIT
1 40 X X = I NT ( RND ( 1 ) *40+ 1 ) : YY= I NT ( RND ( 1 ) *23
+2)
150 GOSUB 660; IF DD<>32 THEN GOTO 140
1 60 LOCATE X X , YY : PEN 3 : PR I NT CHR* ( 23 1 ) :
170 NEXT L
ISO C»0:D~0
190 C=C+1:IF ON THEN C=l
200 IF A(C)=-1 THEN GOTO 190
210 S=SGN(X-A(C) ) :T=SGN(Y-B(C) )
220 X X=A ( C ) +S : YY=B ( C ) +T : GOSUB 660
230 IF DD=231 THEN GOSUB 400: LOCATE A(C)
,B(C): PAPER 0: PRINT" ";: A (C) =-1 : LOCATE X
X , YY : PR I NT " " ? : GOTO 270
240 IF DD-249 THEN GOTO 420
250 LOCATE A (C) , B (C) : PEN 2s PRINT" "?:A<C
)=XX:B(C)=YY: LOCATE XX, YY: PRINT CHR* (225
) 5
260 SOUND 0,300, 10
270 IF INKEY(0>=0 THEN D=0
280 IF INKEY(2)=0 THEN D=2
290 IF INKEY(1)=0 THEN D==l
11
300 IF INKEY(S)=0 THEN D=8
310 S=X:T=Y:IF D=S AND S>1 THEN S=S-1
320 IF D=l AMD S<40 THEM S=S+1
330 IF D=2 AMD T<24 THEM T=T+1
340 IF D=0 AND T>2 THEN T=T-1
350 XX=S:YY=-T:G0SUB 660: IF DD=231 THEN G
0T0 420
360 IF DD=225 THEN GOTO 420
370 LOCATE X,Y:PEN 1:PRINT" " S : LOCATE S,
T sPRINT CHR*(249) ;
380 X=S:Y=T
390 GOTO 190
400 Z=Z-1:IF Z=0 THEN GOTO 490
410 FOR L=l TO 50: SOUND 1 , L*10, 1 : NEXT L:
RETURN
420 FOR L=l TO 50: SOUND 1 , RND ( 1 ) *2000+10
0,2: BORDER INT (RND ( 1 ) #24)
430 NEXT L
440 LOCATE 1,8: PAPER 3: BORDER 3: PEN 0:PR
INT" CAUGHT BY THE ROBOTS
II
450 LOCATE 1,25: PAPER 0:PEN 2: PRINT"
PRESS < SPACE > TO PLAY AGAIN
460
IF INKEY*=" " THEN GOTO 460
470
IF INKEY$<>" " THEN GOTO 470
480
RUN
490
REM PLAYER WIN ROUTINE
500
LOCATE 1,8 .-PAPER 3: BORDER 3: PEN 0
INT'
YOU HAVE SURVIVED THE ISLAND
PR
510 GOTO 460
520 REM PUT MACHINE CODE JUST ABOVE RE-A
DJUSTED HIMEM
530 MEMORY FRE(0)-8<80
540 MOHIMEM+1
550 TA=HIMEM+?.,7F
560 TH=INT(TA/256)
570 TL=TA-256*TH
580 POKE MC,8/.CD
590 POKE MC+1,S<60
600 POKE MC+2,&BB
610 POKE MC+3,?.32
620 POKE MC+4,TL
630 POKE MC+5,TH
640 POKE MC+6,S<C9
650 RETURN
12
660 LOCATE! XX, YY
670 CALL MC
680 DD=PEEK<TA)
690 RETURN
CLEAR PATH
You may recall that the United States space shuttle
Challenger was often nicknamed The Flying Brick' by it's
pilots as it fell to Earth at 5,000 miles an hour, without an
engine.
We have given you the same problem to solve, except we
have made it even nastier for you by bringing you into a
deserted city.
We have given you one edge however. You have a cargo of
bombs which you can use to clear a path for your flying brick.
How to play
Entering the screen at top left you must 'fly' across the city
and demolish the skyscrapers by pressing the space bar to
release your bombs.
14
You can only drop a second, or third, bomb when the first has
hit it's target so there is no point in pressing the space bar and
hoping for the best.
Programming Hints
To change the height of the buildings alter the number after
the * sign in line 680. Remember if you increase the height
you will reduce the time you have to respond.
The Program
10 REM CLEAR PATH
20 GOSUB 440
30 EMT 1,200,2, 1
40 BY— -1
50 GOSUB 620
60 LOCATE 1,1 sPAPER 5 s PEN 10
70 PRINT" SCORE : ";
80 X=1:Y=3
90 LOCATE 11,1
100 PAPER 5 s PEN 10s PRINT SCORE?
110 PAPER 0
120 TX=X+lsTY=Y
130 IP TX=20 THEN TX=1:TY=Y+1
140 IF TY=25 AND TX=10 THEN LOCATE 5,4sP
EN 13:PRINT"LAMDED SAFELY" s SC=SC+200: FOR
W=l TO 1300: NEXT WsMODE OsGQTO 50
150 XX=TX+l:YY=TYs IF XX=21 THEN XX=1:YY=
YY+1
160 GOSUB 5S0
170 IF DD=32 THEN GOTO 250
180 PEN 8: LOCATE 5, 4s PR I NT "YOU CRASHED"
190 IF INKEY*=" " THEN GOTO 190
200 IF INKEY*<>" " THEN GOTO 200
210 RUN
220 SOUND 129,0s SOUND 130,0
230 FOR L=15 TO 0 STEP -1
240 SOUND &129,0,3,5,0,0,LsNEXT L
250 LOCATE X,Ys PRINT" "5
260 LOCATE TX, TY: PRINT CHR* < 197) S CHR* (20
2) ;
15
270 X=TX:Y=TY
280 IF INKEY(47K>0 OR BYO-1 THEN GOTO
330
290 SOUND 1 , 1 0 , 280 ,4,0,1,0
300 BX=X+1
310 BY=Y+l
320 IF BY=26 THEN BY=-1
330 IF BY=--1 THEN GOTO 430
340 IF BY=25 THEN LOCATE BX , BY: PRINT" ";
:BY=-1: SOUND 130,0: SOUND 129,0: GOTO 430
350 XX=BX: YY=BY+1
360 GOSUB 580
370 IF DD=32 THEN LOCATE BX, BY: PRINT" "3
: LOCATE BX,BY+1:PEN 9: PRINT CHR* (252) s : B
Y=BY+1:G0T0 430
380 SOUND 129,0
390 SOUND 1 30 ,0,1 00 , 3 , 0 , 0 , RND ( 1 ) #4+ 1 0
400 SC0RE=SC0RE+10
410 LOCATE BX, BY: PRINT" " ;
420 BY=BY+1: LOCATE BX,BY:PEN 9: PRINT CHR
*<252> ;
430 GOTO 90
440 REM PUT MACHINE CODE JUST ABOVE RE-A
D JUSTED HI MEM
450 MEMORY FRE(0)-?<80
460 MC=HIMEM+1
470 TA=HIMEM+&7F
480 TH=INT(TA/256)
490 TL=TA-256*TH
500 POKE MC&CD
510 POKE MC+1,.^60
520 POKE MC+2,2<BB
530 POKE MC+3,2<32
540 POKE MC+4,TL
550 POKE MC+5,TH
560 POKE MC+6,2,C9
570 RETURN
580 LOCATE XX, YY
590 CALL MC
600 DD=PEEK(TA)
610 RETURN
620 REM DRAW THE CITY-SCAPE
630 MODE 0
640 BORDER 7
650 PEN 3
660 PAPER 1
16
670
FOR L=
t to :
20
680
FOR Q=25 TO
24-
•RND ( 1 ) *4
s
TEP
690
LOCATE
L,Q
700
PRINT CHR*<:
207)
|!
7 1 0
NEXT Q
720
NEXT L
730
RETURN
CASTLE 'ADVENTURE'
Start looking out your armour, your good luck charms and
your trusty friends as you are on your way to try and save the
Elf King's daughter, yes we said Elf, from her prison.
The girl's father is waiting for her return in the woods outside
the castle. He's not stupid!
How to play
The program only uses two word commands, all of which are
shown in the data statements at the end of the listing. Do not
try to enter multiple statements such as "TAKE KNIFE AND
RUN".
You can, however, abbreviate the direction commands to
their initial letter i.e. "GO N" for Go ISIorth.
If you haven't 'adventured' before remember that, if you are
stuck somewhere and can't seem to be able to move on, you
18
can ask to take Inventory which can also be abbreviated to
INV.
The Program
1 REM CASTLE ADVENTURE
5 MODE 2
10 DIM DD$(50) ,0P<18> ,0D$<18> ,STUNT<50>
20 DIM ROUTE (50, 6)
30 PLOC-1
40 PF~0
90 GOSUB 9000
95 GOSUB 5000
100 GOSUB 7600
110 GOSUB 3000s IF VERB=0 THEN PRINT"! do
n't understand you": GOTO .100
115 GOSUB 4000
120 ON VERB GOSUB 7000,, 7000, 7000, 7000, 70
00, 7000, 8000, 6000, 6500, 5000, 7500, 7400, 73
00 , 7700 , 7800 , 7900
130 GOTO 100
999 END
1000 REM RETURN VERB NUMBER IN I/P STRIM
G
1010 RESTORE 10000sT=0
1020 READ T$
1030 IF T*="*" THEN RETURN
1040 IF LEFT*(T*,1)="! " THEN T*=RIGHT*(T
*,LEN(T*)-1) :T=T+1
1050 IF T$=V$ THEN VERB=T: RETURN
1060 GOTO 1020
2000 REM RETURN NOUN NUMBER IN I/P STRUM
G
2010 RESTORE 11000:T=0
2020 READ T*
2030 IF T*="*" THEN RETURN
2040 IF LEFT*(T*, 1)=" ! " THEN T*=RIGHT$ (T
$,LEN<T*)-1) :T=T+1
2050 IF T*=N* THEN NQUN=T: RETURN
2060 GOTO 2020
3000 REM PARSE THEN INPUT AND ANALYSE
3010 VERB=0:NOUN=0: IF 1*="" THEN RETURN
19
3020 P=G:F0R L=LEN(I*) TO 1 STEP' -1
3030 I F M I D* ( I $ , L , 1 ) = '» " THEN P=L
3040 NEXT L
3050 IF P=0 THEN V*=I*:GQSUB 1000: RETURN
3060 V$=M I D* < I * , 1 , P- 1 ) - N*«M I D* ( I * , P+ 3 „ 40
)
3070 GOSUB lOOOnGOSUB 2000
3099 RETURN
4000 ON STUNT (PLOO+1 GOTO 4010,4100,420
0, 4300, 4400,, 4500,, 4600, 4700, 480D, 490o'
4010 RETURN
4100 IF PFOl AND 0P(3)=0 THEN 0P(3)=-1:
PR I NT" The princess dies of hunger ":: GOTO
4010
4110 RETURN
4200 PRINT" You -fall out of the tree and
break your neck " s GOTO 8990
4300 PR I NT "The tree is wobbling very dan
gerously": stunt (ploc)=2s GOTO 4010
4400 PR I NT "The tree is swaying in the wi
nd" s stunt (pi oc ) =3: GOTO 4010
4500 PRINT" :* That looks nice-", says the g
uard, eyeing your gal d " s GOTO 4010
4700 IF op (12)00 THEM PR I NT "The f 1 onr d
rags you back, faster than you can move"
:ploc=46:G0T0 4010
4710 PR I NT "Your ring of speed glows and
you rush down the corridor past the slid
ing f loor" : pi oc =50: GOTO 4010
4800 PRINT"A portcullis drops down hard
behind you, barring the castle entrance11
: s t un t ( p 1 oc ) =0 a GOTO 40 1 0
4900 IF op(3)<>0 THEN PRINT"The elver, ki
ng sees that you have failed in your res
cue attempt, and he swiftly kills you" : G
0T0 8990
4910 PRINT"The elven king greets you wit
h fair words and offers you all the gold
and silver of his kingdom as reward for
the safe re
turn of his daughter"
4920 GOTO 8990
5000 REM describe (ploc)
5010 PR I NT "You are " ;
5020 1=0
5030 1=1 + 1: IF l>LEN(DD$(ploc) ) THEN GOTO
5099
20
5040 IF MID*(DD*(ploc) ,L, 1)=" ! " OR MID*<
DD*(PLDC) ,L,1)="*" OR MID* (DD* (PLOC) , L, 1
)="" THEN GOTO 5099
5050 PR INT M I D* < DD* ( PLOC ) , L , 1 ) 5
5060 GOTO 5030
5099 PR I NT :: GOSUB 5200 : RETURN
5100 REM DESCRIBE OBJECT NUMBER (N)
5110 PRINT
5120 L=0
5130 L=L+1:IF L>LEN (OD* (N) ) THEN GOTO 51
99
5140 IF MID* (OD* (NOUN) ,L, 1)="" OR MID*(0
D*(N0UN),L,1)=" !" THEN GOTO 5199
5150 PRINT MID*(OD*(N) ,L., 1) !
5160 GOTO 5130
5199 PRINT: RETURN
5200 REM DESCRIBE ALL (PLOC) OBJECTS
5205 F=0 : PR I NT " Th er e is " ;
5210 FOR N=l TO 18
5220 IF OP(N)=PLOC THEN NOUN=N: F=l : BQSUB
5100
5230 NEXT Ms PRINT: IF F-0 THEN PRINT"noth
ing here" ELSE PRINT "here"
5299 RETURN
6000 REM TAKE COMMAND
6010 IF NOUN=0 THEN PR I NT "Take what ?":R
ETURN
6015 IF 0P(N0UN)OPL0C OR OP (NOUN) =-l TH
EN PR I NT "Take what ?": RETURN
6020 IF OP (NOUN) =0 THEN PRINT" You ' ve alr-
eady got. it, dumbo" : RETURN
6025 IF N0UNM3 THEN PRINT"You can't tak
e that": RETURN
6030 PR I NT "O.K. You've got it now"
6040 OP ( NOUN ) =0 : RETURN
6500 REM DROP COMMAND
6510 IF NOUN=0 THEN PR I NT "Drop what ?":R
ETURN
6515 IF OP(NOUN)<>0 THEN PR I NT "Drop what
?": RETURN
6520 PR I NT "O.K. It's dropped"
6530 OP ( NOUN ) =PLOC : RETURN
6700 FOR L=l TO LEN (OD* (NOUN) )
6710 IF MID* (OD* (NOUN) , L, 1)=" ! " THEN OD*
(NOUN) =LEFT* (OD* (NOUN) , L-l ) +" "+MID* (OD*
(NOUN) ,L+1)
21
6720 NEXT L: RETURN
6800 FOR L=l TO LEIM (DD* (PLOC) )
6810 IF MID* (DD* (PLOC) ,L, 1)=" ! " THEN DD*
(PLOC) =LEFT* (DD* (PLOC) , L-l ) +" "+MID* (DD*
(PL.OC) ,L+1)
6820 NEXT L: RETURN
6900 FOR L=l TO LEM (DD* (PLOC) )
6910 IF MID*(DD*(PL0C),L,1)="*" THEN DD*
( PLOC ) =LEFT* ( DD* ( PLOC ) , L - 1 ) + " " +m i d* ( DD*
(PL0C),L+1)
6920 NEXT L: RETURN
7000 NLOC=ROUTE(PLOC,VERB):IF NLOCO-1 A
MD MLOC< >0 THEN PR I NT " 0 . K . " : PR I NT : PLOC=M
LOC : GOSUB 5000 : GOSUB 4000 : RETURN
7010 IF NLOO-1 THEN GOTO 7030
7020 IF VERB=5 THEN PRINT"There' s nothin
g that you can climb here" : RETURN
7025 PR I NT "You can't move in that direct
ion": RETURN
7030 PR INT "A door blocks your way":RETUR
N
7300 IF NOUIMOO THEN PRINT"try EXAMINF":
RETURN
7310 GOSUB 6800: GOSUB 5000 s RETURN
7400 IF NOUN=0 THEN PR I NT "ex amine what •>
" s RETURN
7405 IF 0P(N0UN)<>0 AND OP (NOUN) OPLOC T
HLN PR I NT "ex amine what ?": RETURN
7410 GOSUB 6700: N=N0UN: GOSUB 5100: RETURN
7500 REM INVENTORY
7510 F=0: PRINT" You are holding : " : FOR N=
1 TO 18
7520 IF 0P(N)=0 THEN F=l : N0UN=N: GOSUB 51
00
7530 NEXT N: PRINT: IF F=0 THEN PRINT"noth
ing"
7599 RETURN
7600 1*="": PRINT: PRINT" : ";
7610 A*=INKEY*:IF A*<>"" THEN GOTO 7610
7620 A*=INKEY*:IF A*="" THEN GOTO 7620
7625 IF A*>="a" AND A*< = ":•:" THEN A*=CHR$
(ASC(A*)-32)
7630 IF ASC(A*)=13 AND LEN(I*)>0 THEN PR
INT: RETURN
7640 IF ASC(A*)<>127 AND LEN(I*)<30 THEN
I*=I*+A*:PRINT A*:: GOTO 7610
22
7650 IF ASC(A*X>127 THEN GOTO 7610
7660 IF LEN(I*)=0 THEN GOTO 7600
7670 I*=LEFT* <I*,LEN (I*) -1) : PRINT CHR*(8
) i " " ; CHR* ( S ) ; : GOTO 76 1 0
7700 IF NOUN=0 THEN PR I NT "Give what. ?":R
ETURN
7710 IF N0UNO2 AND N0UNO7 AND N0UNO9
AND N0UNO4 AND N0UNO12 THEN PRINT" It's
returned to you" : RETURN
7720 IF PL0CO17 THEN GOTO 7750
7730 IF N0UIMO7 AND N0UNO12 THEN PRINT"
The guard recognises the stolen goods an
d promptly kills you.": GOTO 8990
7740 PR I NT "The guard snatches your bribe
and opens the gate" : OP (NOUN) =-1 : ROUTE ( 1
7 , 2 ) = 1 8 : STUNT (17) =0 : RETURN
7750 IF PL0CX11 OR PL0O14 THEN PRINT"Th
ere is nobody here who wants anything" :R
ETURN
7760 IF NOUIM-4 THEN PR I NT "The princess t
hanks you kindly for the food and looks
much better" : ODS (4) ="a beautiful, health
y looking pr
i ncess" : PF=1
7770 OP ( NOUN ) =- 1 : RETURN
7800 IF N0UN=0 THEN PRINT"but who ?":RET
URN
7810 IF N0UNO15 AND N0UNO16 THEN PRINT
"You can't. ": RETURN
7820 IF 0P(N0UN)OPL0C THEN PRINT "You ca
n't. ": RETURN
7830 IF N0UN=15 THEN PRINT"The kings esc
ort instantly rises from his light slumb
er and despatches you with one blow of h
is sword "s GO
TO 8990
7840 IF 0P(5)=0 THEN PR I NT "The guard swi
ngs hi 5 mace and your knife breaks": OP (5
)=-l: RETURN
7850 PRINT"The guard hits you over the h
ead and knocks you out. He takes the pri
ncess back to the tower"
7860 0P(3)=14:0D$(3)="A very distressed
princess" : RETURN
7900 I F N0UN< >0 THEN PR I NT " 0 . K . '"3 0D* <
NOUN) 5 "' ": RETURN
23
7910 IF N$="CPC"
,3>=7:G0SUB 6900:
7920 IF N$="464"
,2>=4:G0SUB 6900:
7930 PR I NT "O.K. '
AMD PL0C=6 THEN ROUTE (6
RETURN
AND PL0C=3 THEN ROUTE (3
RETURN
"JN*; "' ": RETURN
what
RE
8000 IF NOUN=0 THEN PR I NT "U"
TURN
8005 IF 0P(N0UN)OPL0C AND OP < NOUN )<>0 T
HEN PRINT"Use what ?": RETURN
8010 IF N0UN=1 THEN GOTO 8100
8011 IF N0UN=4 THEN GOTO 8200
8012 IF N0UN=8 THEN GOTO 8300
8013 IF N0UN==13 THEN GOTO 8400
8014 IF N0UN=18 THEN GOTO 8800
8019 GOTO 8750
8100 IF PL0CO15 THEN PR I NT "The ground i
s too hard here": RETURN
8110 PRINT" You dig in the soft earth and
reveal something" : ROUTE ( 15, 6) =48: GOSUB
6900: RETURN
8200 PRINT"Someone, somewhere, needed th
more than you d id": OP ( 4 ) =•••• 1 : RETU
1 1 need to
use some rope
PL0O2
is now
THEN PR I NT "The door
open": ROUTE (PLOC, 2)
to
= 1 6 :
th
RE
at -food
RN
8300 PR I NT "You
: RETURN
8400 IF
e south
TURN
8410 IF PLQC=3 THEM PR I NT "A combination
is needed
ETURN
8420 IF PL0C=6 THEM PRINT" You' 1 1 need
e password to get in here": RETURN
8430 IF PL0C=18 THEM PR I NT" There ' s no
y you can unlock a portcul 1 i s" : RETURN
8440 PRINT" There's nothing to unlock her
e": RETURN
8750 PRINT"You can't use that !": RETURN
8800 PRINT" You carefully tie the bucket.
to the rope and lower it down the well":
FOR 1=1 TO 800: NEXT 1
8810 PR I NT "Your draw the bucket up again
": FOR 1=1 TO 800: NEXT 1 : PR I NT "There is s
omething at the bottom o-f i t " : OP (7) =PL0C
8820 PRINT" You let go o-f the rope and th
e bucket -falls back down the well":op(8)
to get into the garden shed":R
th
wa
24
•-■=-- 1 : op ( 1 8 ) =- 1 : PR I NT " The ob j ect you f ound
lies glitte
r i n g on the g r o u n d ' '
8830 RETURN
8990 PR I NT : PR I NT : PR I NT : PR I NT : PR I NT : END
9000 REM SETUP ALL THE ARRAYS
9010 FOR L=1'T0 50: STUNT <L> =0: NEXT L
9020 STUNT (7) =1 : STUNT (22) =9: STUNT (28) =4:
STUNT (31) =4
9030 STUNT ( 1 7 ) =5 : STUNT ( 49 ) =7 s STUNT (18) =8
9050 RESTORE 12000: FOR L=l TO 50
9060 FOR N=l TO 6: READ ROUTE (L,N)
9070 NEXT N:NEXT L
9080 RESTORE 13000
9090 FOR L=l TO 18: READ OP (L): NEXT L
9100 OD$(l)-nA shovel! ready to dig the e
arth" : QD$ (2) = "A pi 1 e of treasure ! gathers
d in the days of great empires"
9110 od*(3)="A princess! as beautiful as
any elven king's daughter could be":od$(
4)= "Some f ood ! 1 ovi ngl y prepared and fit
for royalty"
9120 od$(5)="A knife! razor sharp, cursed
by many, loved by •few"sod$(6)=,'A large
book! telling of the prowess of the kings
escort "
9130 od*(7)="A gold coin" : od* (8) ~"A buck
et!of untold riches" : od* (9) = "many Silver-
Plates ! inscribed with the mystical rune
s E.P.N.S. "
9140 od$ ( 10) =MNotepaper ! bearing the lege
nd CPC" sod* ( 1 1 ) ="An ancient scroll Ireadi
ng 'find my daughter and be richly rewar
ded? "
9150 ad*(12)="A shining ring! of speed" so
d*(13)-"A key" s od* (14)=" A tree ! branches
hang down low and the trunk reaches for
the sky"
9160 od*<15)="The kings escort ! sleeping
lightlynsod*< 16)="A castl e guard ! who loo
ks very bored"
9170 od*(17)="A well {radiating magice"so
d*(18)=*'A long well made rope"
9210 dd*(l)="in the centre of the castle
courtyard" : dd* (2) ~" at the south end o^
the courtyard ! an opening leads further s
outh"
25
9220 dd*(3)=Mby the entrance to the west
tower the garden shed is south$the shed
door is open" : dd$ (4) =" inside a garden s
hed"
9230 dd*(5)=nat the bottom of a winding
stairway":dd*(6)="by the entrance to the
east tower" :dd*(7)="at the bottom of a
staircase"
9240 dd*(S)=non a winding stairway ": dd$ (
9)=dd*(B):dd*(10)="at the top of a stair
way!' 464' is scrawled on the wall"
9250 dd$(ll)~"on a steep stai rcase" s dd$ (
12)=dd*(ll) :dd*(13)=dd*<ll) : dd* ( 14) ="at
the very top of the east tower"
9260 dd*<15)="beside a soft patch of ear-
th in the courtyard*a hole leads down" :d
d*(16)="at the northern end of a guarded
passage"
9270 dd$(17)="in a tunnel. An aging guar
d blocks your way south ": dd$ ( 18) = "on the
main East /West road of middle earth"
9280 dd*(19)="on the road, a forest lies
to the south": did* (20)-" on the road,. A la
rge sign reads s Adventure in need of ex-
tension :
: ROAD AHEAD CLOSED :: "
9290 dd*(21)="on top of a large unclxmab
le cliff overlooking a vast panorama of
places to adventure" : dd* (22) = " in a small
clearing in
the forest"
9300 dd*(23)="on the edge of a vast fore
st,l:dd*(24)=,,lost deep in a ■forest,,:dd$(
25)=" lost in a -forest " s dd* (26) =" lost wit
hin a forest
ii
9310 dd$ (27) ="hal-f way up a large treelth
e tree extends upwards" : dd$ (28) =" at the
top of the tree j a small clearing is vis
ible below"
9320 dd*(29)="in the courtyard" : dd* (30) ~
"in the shade in the courtyard" s dd* (31 ) =*
"at the top of a tree in the courtyard t
here is a pr
incess in the east tower"
26
9330 dd*(32>=" In the north-west corner o
f the courtyard" : cld$ (33) ="on stairs lead
ing down into the dungeon" : dd* (34) =" in t
he guard roo
m"
9340 d d $ ( 35 ) = "In t h e h an que t ing hall": d d
*(36>="At the east end o-f the banqueting
hallla door leads north to the kitchen"
9350 dd*(37)=n In the castle kitchen ": dd$
(38)= "At the north end of a north-south
corridor" :dd$( 39)=" in the servants quart
ers"
9360 dd*(40)=*'in the royal bedroom ! there
is a door to the west " : dd$ (41 ) =" i n the
castle library" :dd$ (42) ="in the grand th
rone room"
9370 dd* (43)=" in a north-south corridor!
cells lead east and west " s dd* (44) =" i n an
empty eel 1 " : dd* (45) =dd* (44)
9380 dd$(46)="in a north-south corridor"
:DD*(47)="in a cell"
9390 dd$(48)="in a locked dungeon cell":
dd*(49)="At the south end o-f a corridor"
:dd*(50)=dd*(49)
9999 RETURN
10000 DATA ! NORTH, N, ! SOUTH, S, !EAST,E, ! WE
ST, W
10010 DATA
10020 DATA
10030 DATA
10040 DATA
10050 DATA
10060 DATA
10070 DATA
10080 DATA
K
! UP, U, CLIMB, !D0WN,D
! USE
! TAKE, GET
! DROP, PUT
! LOOK
! INVENTORY, HW
! EXAMINE, ! SEARCH
! GIVE, BRIBE, ! FIGHT, KILL, ATTAC
10090
10999
1 1000
! SAY, SHOUT
TREASURE, !PRIN
DATA !
DATA*
DATA ! SHOVEL, SPADE.
CESS), ! FOOD
11010 DATA ! KNIFE, WEAPON, ! BOOK, ! GOLD, CO I
N, ! BUCKET, ! SILVER, PLATES
11020 DATA ! NOTEPAPER, PAPER, NOTE, ! SCROLL
, ! RING, SPEED, ! KEY
11030 DATA ! TREE, TRUNK, ! ESCORT, ! GUARD, SO
LDIER,BORED, !WELL, ! ROPE
27
1.1999 DATA*
1 2000 DATA 29 ,2,6, 3 , 0 , 0 ,1,-1, 30 , 0 , 0 , 0 ., 32
., - 1 , 1,5, 0 , 0
1 20 1 0 DATA 3 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 3 ,, 0 , 8 , 0 ,15, 30
,-1,1,0,0
1 2020 DATA 0 , 0 ,0,6,11, 0 , 0 , 0 ,, 0 , 0 ,9,5, 0 , 0 ,
0 , 0 , 1 0 , 8 , 0 , 0 , 0 , 0 , 0 , 9 , 0 , 0 „ 0 ,0,12,7, 0 , 0 , 0 ,
0,13,11
1 2030 DATA 0 , 0 ., 0 , 0 ,14,12, 0 ,, 0 , 0 , 0 , 0 ,13, 35
,6,0,29,0,0,2, 17., 0 , 0 ,0,0, 16, 0 , 0 , 0 , 0 „ 0 , -- 1
,23,19,21,0,0
1 2040 DATA 0 ,23,20,18, 0 , 0 , 0 , 23 , 0 , 1 9 , 0 , 0 ,
0,23,18,0,0,0
12050 DATA 25,26,24,26,0,0,18,24,26,25,0
,0,25,26,24,25,27,0,26,24,25,26,27,0,25,
24 , 26 , 25 , 27 , 0 , 0 , 0 , 0 , 0 , 28 , 22
1 2060 DATA 0 , 0 , 0 ,0,0,27,0,1,15,32, 0 , 0 , 6 ,
0,0, 2,31 , 0, 0, 0, 0,0, 0, 30, 34, 3, 29, 0,0, 0,0,
0,35,40,0,38
1 2070 DATA 42 , 32 , 0 , 0 , 0 , 0 , 39 ,15,36, 33 , 0 , 0
, 37, 0,0, 35, 0, 0,0, 36, 0, 39, 0,0,0, 43, -1,-1,
33 , 0 ,0,35,37, 0 ., 0 , 0
1 2080 DATA 41,0,-1,-1,0,0 , 0 , 40 , 0 , 42 ., O , O,
0, 34, 41 , 0, 0, 0, 38, 46, 44, 45, 0, 0, O, 0,0, 43, 0
,0,0,0,43,0,0,0
1 2090 DATA 43,49,47,-1,0, 0 , 0 , 0 , 0 , 46 , 0 , 0 ,
0 ,0,-1,0,15,0,0, 0 , 0 , 0 , 0 , 0 , 46 , 0 , 0 , 0 , 0 , 0
13000 DATA 4,42,14,37,39,41,-1,29,35,50,
0,48,47,30,34,17,29,29
MINEFIELD
It's a darned hard life for the little man who has been deserted
by his fellow soldiers, in the middle of a mine field. See if you
can help him reach the dug-out where his colleagues are
hiding.
The mines are randomly generated, so be careful of your
moves. Don't tell the little soldier but we believe, on very good
authority, that when he reaches the safety of the dug-out he is
going to be sent out on another mission.
Every time he makes it through the minefield the number of
mines increase and he must keep going until
How to play
Use arrow keys to move. When the inevitable overcomes your
hero you will see a score on the screen and you may press the
space bar to send the poor little beggar back into the field.
29
Programming hints
Set the difficulty level when asked to do so.
The program
10
20
30
40
50
60
70
80
90
10
11
13
14
15
16
17
ia
19
20
21
24
25
1
26
27
1
28
29
30
31
>20
53(
REM MINEFIELD
GOSUB 550
C=5
D=l
GOSUB 430
SCDRE=0
MODE 0
BORDER 13
PAPER 13: PEN 5
LOCATE 1,1
PRINT" MINEFIELD
II ■
LOCATE 1,25 s PRINT"
SCORE
PAPER 0
EVERY 4, 1 GOSUB 930
PEN 14
LOCATE 19,23
PRINT CHR*<203) 5
X=3:Y=3
XX = X: YY=Y
Q=DIF
Q=Q-1
IF QOO THEN GOTO 210
SC0RE=SC0RE+10
IF INKEY<8)=0 AND XXOl THEN XX=XX-1
IF INKEY(1)=0 AND XXO20 THEN XX = XX+-
IF INKEY(0)=0 AND YY<>3 THEN YY=YY-1
IF INKEY(2)=0 AND YYO-24 THEN YY=YY+-
IF XX=X AND YY=Y THEN GOTO 360
GOSUB 690
IF DD=231 THEN GOTO 830
0 IF DD=203 THEN GOTO 740
IF DD<>32 THEN GOTO 190
LOCATE X,Y: PRINT" "
30
340
350
360
370
+3)
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
LOCATE XX,YY:PEN 9
PRINT CHR$<249) ;
X = XX: Y=YY
XX=INT(RND<1>*20+1> : YY=INT (RND ( 1 ) *22
GOSUB 690
IF DD<>32 THEN GOTO 370
PEN 8: LOCATE XX,, YY
PRINT CHR*(231> ?
GOTO 190
REM SET DIFFICULY LEVEL
NODE 0
LOCATE 1,4
PRINT"
LOCATE 1,8
PR I NT "0 IS EASY
SET THE DIFFICULTY
LOCATE
PRINT"
K*=INKEY*
IF K*<"0"
1, 10
iS HARDEST"
OR K$>"9" THEN
DIF=50-5*<A5C(K$)-ASC("0
RETURN
REM PUT MACHINE
DJUSTED HIMEM
560 MEMORY FRE(0)-&80
MC=HIMEM+1
TA=HIMEM+&7F
TH=INT(TA/256)
TL=TA-256*TH
POKE MC,&CD
MC+ 1,^60
MC+2,&BB
MC+3,2.<32
MC+4..TL
MC+SjTH
MC+6S&C9
GOTU 510
) )
CODE JUST ABOVE RE-A
570
580
590
600
6 1 0
620
630
640
650
660
670
680
690
700
710
720
730
740
750
760
770
POKE
POKE
POKE
POKE
POKE
POKE
RETURN
REM READ FROM SCREEN (XX, YY) INTO DD
LOCATE XX, YY
CALL MC
DD=PEEK(TA)
RETURN
REM REACHED EDGE OF MINEFIELD
LOCATE 1,8
PRINT" YOU HAVE ESCAPED "
LOCATE 1,10
31
780 PRINT" YOU SCORE :
790 LOCATE 15, 10
800 PRINT SCORE
810 GOTO 890
820 END
830 REM HIT A MINE => KILLED
840 PAPER 4: PEN 15
850 LOCATE 1,8
860 PR I NT "YOU HAVE BEEN KILLED"
870 LOCATE 1, 10
880 PRINT" YOU SCORE 0
890 IF IMKEY*=" " THEN GOTO 890
900 IF INKEY*<>" " THEN GOTO 900
910 GOTO 60
920 END
930 C=C+D:IF C=25 OR C=4 THEN D=-D:GOTO
930
940 INK 8,C
950 RETURN
ASTEROID STORM
Your force field defences have disintegrated; your lasers have
overheated and you are now approaching a meteroid belt.
We don't hold out much hope for your survival as it's only a
matter of time, and manual dexterity, as to how long you can
keep going.
Your cruiser is moving down the screen and a continuous
wave of rocks and star particles are rising to meet you so good
luck.
How to play
As you have no defence systems left you must try to stay alive
by moving left and right using arrow keys.
33
Programming Hints
To slow up the asteroids you can insert a delay as follows:
Line 195 FOR Z= 1 to 30: NEXT Z
The Program
10 REM ASTEROID STORM
20 GOSUB 410
30 REM NEW PLAYER
40 SC0RE=0
50 MODE 1
60 BORDER 18
70 SHIPX-1S
SO YY=1
90 SHIP*=" "+CHR*(245)+" "
100 PAPER 0
110 INK 0, 13
120 CLS
130 REM MAIN LOOP
140 A=INT(RND(1>*35+1)
150 B=INT(RND<1)#(38~A>+1)
160 PEN 3
170 LOCATE A, 25: PR I NT"*".!
ISO LOCATE B, 25: PRINT"*": LOCATE 40, 25: PR
INT" "
190 REM MOVE SHIP
200 SC0RE=SC0RE+15
210 IF INKEY(S)=0 AND SHIPXM THEN SHIPX
=SHIPX-1
220 IF INKEY(1>=0 AND SHIPXC38 THEN SHIP
X=SHIPX+1
230 XX=SHIPX+1
240 GOSUB 550
250 IF DD=42 THEN GOTO 300
260 LOCATE SHIPX, 1
270 PEN 1
280 PRINT SHIP$
290 GOTO 130
300 REM KILLED BY A ASTEREORIC COLLISION
310 PAPER 1
320 PEN 3
34
330 LOCATE 16, 6: PRINT"Oh Dear,"
340 FOR Q==l TO 1000: NEXT Q
350 LOCATE 8, 10: PRINT" Another one bites
the dust"
360 FOR q=l TO 1000: NEXT q
370 LOCATE 10, 14: PRINT" YOU SCORED : " 5 SC
ORE; "
380 IF INKEY*=" " THEN GOTO 380
390 IF INKEY*<>" " THEN GOTO 390
400 GOTO 30
410 REM PUT MACHINE CODE JUST ABOVE RE-A
DJUSTED HIMEM
420 MEMORY FRE(0)-&80
430 MC=HIMEM+1
440 TA=HIMEM+&7F
450 TH=INT(TA/256)
460 TL=TA-256*TH
470 POKE MC,S<CD
480 POKE MC+i,&60
490 POKE MC+2,&BB
500 POKE MC+3,&32
510 POKE MC+4,TL
520 POKE MC+5,TH
530 POKE MC+6,S<C9
540 RETURN
550 LOCATE XX, YY
560 CALL MC
570 DD=PEEK(TA)
580 RETURN
WORDGRAMS
If you are tired of zapping, crunching and powing the aliens of
the Universe perhaps you would like to try something a little
more cerebral.
Your Amstrad will choose a word at random, from a selection,
and scramble the letters on the screen. You must determine
the word and enter your answer.
How to play
Type in the word you think has been scrambled and press
ENTER.
You will be given a selection of ten words and will receive
points based on your efforts.
36
Programing Hints
You can alter the words by changing the data in lines 290
onwards but remember, if you change the number of words,
you must change the items in Line 280.
The Program
10 REM ANAGRAMS
20 MODE 2
30 RESTORE
40 READ M
50 FOR L=l TO INT(RNDU)*N-i-l)
60 READ W$
70 NEXT L
SO A$=W$
90 FOR L=l TO 30
100 S=INT<RND(1>*LEN(W*>+1)
110 A*=MID*(A*',S, 1)+LEFT*(A$,S-1)+MID$(A
$,3+1,255)
120 NEXT L
130 CLSs LOCATE 1 , 10: PRINT "The anagram is
a Urn
« !>
140 PRINT a$
150 LOCATE 1, 16
160 PRINT" What is the hidden word :
II
170 LOCATE 26, 16
180 INPUT g$
190 IF G$="" OR LEN(G$)>15 THEM GOTO 150
200 IF G$=W* THEN GOTO 250
210 LOCATE 1,20
220 PRINT"WRONG ... BAD LUCK"
230 FOR Q=l TO 1500s NEXT Q
240 GOTO 30
250 LOCATE 1,20
260 PRINT"CORRECT ... WELL DONE"
270 GOTO 230
280 DATA 40
290 DATA AMSTRAD, COMPUTER
300 DATA TELEVISION, COLOUR
310 DATA CINEMA, BUNGALOW
320 DATA SUITCASE, CASSETTE
37
330 DATA CARPET, CEILING
340 DATA MATHEMATICAL
350 DATA GYROSCOPE
360 DATA AERIAL, GENERATOR
370 DATA GLASS, NEEDLE
380 DATA SIENNA, VIENNA
390 DATA CHARISMATIC, REMOTE
400 DATA PICTURE, ENCYCLOPEDIA
4.10 DATA RABBIT, AARDVARK
420 DATA STANDARD, TELEPHONE
430 DATA BOXES, BOARD
440 DATA HEATER, AMPLIFIER
450 DATA BASIC, VIDEO
460 DATA DIFFICULT, STRANGE
470 DATA CARAVAN, ALARM
480 DATA SPADE, SKIER
490 DATA HOARSE, FROST
DRIVING TEST
You have been hurtling down country lanes in your new
sports car, trying to impress your lady friend by your side,
only to find that your brakes have gone and there is a steep
incline before you.
Try to stay on the road — you know it makes sense.
How to play
Steer the car using the arrow keys to move left and right.
When you finally run out of road you will see a score on the
screen.
39
The program
10 REM DRIVING TEST
20 DEFINT A-Z
30 MODE 1
40 SYMBOL 255 , &99 , &FF , &99 , &3C , &3C , &BD „ fcF
F,&99
50 GOSUB 440
60 LOCATE 5,5: INPUT"DIFFICULTY (4-7) " 5 D
70 IF D<4 OR D>7 OR DO I NT (D) THEN GOTO
60
80 RQAD$=CHR* (217) +CHR* (207)
90 FOR L=l TO D
100 ROAD*=RQAD*+" "
110 NEXT L
1 20 RO AD*=ROAD*+CHR$ ( 207 ) +CHR* (219)
130 RMAX=37-D
140 CLS
150 SC=0
160 BORDER 21
170 CAR=8:R0AD=12
ISO LOCATE 1,25: FOR L=l TO ROAD: PRINT CH
R$(207) ; :NEXT L
190 LOCATE ROAD+D+ 1,25 : FOR L=l TO 28-D:P
RINT CHR* (207) j: NEXT L
200 PRINT
210 XX=CAR:YY=2: GOSUB 580
220 SC=SC+1
230 IF DD<>32 THEN GOTO 320
240 IF INKEY(8)=0 AND CAR>1 THEN CAR=CAR
-1
250 IF INKEY(1)=0 AND CAR<40 THEN CAR=CA
R+l
260 LOCATE XX, 1: PR I NT CHR$(255);
270 IF RND(1)>0.4 AND R0AD>1 THEN ROAD=R
OAD-1
280 IF RND(1)>0.4 AND ROAD<RMAX THEN ROA
D=R0AD+1
290 LOCATE ROAD, 25: PRINT ROAD*: PR I NT
300 SOUND 1 , 1 000 ,3,7,0,0,5
310 GOTO 210
320 FOR L=15 TO 0 STEP -1
330 BORDER L*1.5
340 SOUND 1,0, 30 ,7,0, 0 , L
40
350
360
370
380
390
400
CORED
410 IF
FDR Q=l TO 5
PLOT 310,200
DRAW RND ( 1 ) *639+ 1 , RND ( 1 ) *400+ 1
NEXT Q
NEXT L
LOCATE 1,2=
"use
INKEY*='
PRINT'
YOU S3
420 IF INKEY*<>" "
430 GOTO 60
440 REM PUT MACHINE
JUSTED HI MEM
450 MEMORY FRE(0)-S<80
460 MC=HIMEM+1
470 TA=HIMEM+&7F
480 TH=INT(TA/256)
490 TL=TA--256*TH
500 POKE MC,&CD
510 POKE MC+1.&60
520 POKE MC+2
530 POKE MC+3
540 POKE MC+4
550 POKE MC+5
560 POKE MC+6
570 RETURN
580 LOCATE XX, YY
590 CALL MC
600 DD-PEEK(TA)
610 RETURN
THEM GOTO 410
THEN GOTO 420
CODE JUST ABOVE READ
&BB
TL
TH
S/.C9
SPACE TREK
It's time to bravely go where no man has gone before, or
something like that anyway.
We have supplied you here with Photon Torpedoes, Phaser
Weapons and long and short range scanners but, of course,
you are still going to have to deal with the Klingons yourself.
How to play
You will be given a 'menu' to choose from when you begin.
Once you have made your choice the playing instructions will
appear on the screen.
42
The Program
10 REM SPACE-TREK
20 GOSUB 3000
30 GOSUB 3500
40 EN=5000
50 SD=0
60 NP=10
100 REM MAIN TURN LOOP
105 IF EN<0 THEN GOTO 10000
107 SD=SD-Kl„ 04
110 MODE 1: PAPER 0: BORDER 2:CLS
115 PEN 1
120 LOCATE 8, 4: PR I NT "SPACE TREK COMMANDS
li
1 30 LOCATE 7 , 5 : PR I NT " =====================:
140
150
160
170
180
190
200
210
211
213
LOCATE 1,11
PRINT" (1) Warp Engines"
Impulse Engines"
Phaser s"
Photon Torpedoes"
Dock with Starship'
Long range scan"
Short range scan"
PRINT" (2)
PRINT" (3)
PRINT" (4)
PRINT" (5)
PRINT" (6)
PRINT" (7)
a*=INKEY$
EN=EN+1: IF
EN>5000 THEN EN=5000
IF KS=0 THEN
LOCATE 5,21; PR I NT " COND I
2 1 : PR
215
TION GREEN": GOTO 218 ELSE LOCATE 5
INT "CONDITION RED": BORDER 3
216 IF RND<0.06*KS THEN GOSUB 9000
218 LOCATE 15, 19: PR I NT "SHIP ENERGY
"EN"
219
220
IF A*<"1" OR A*>"7" THEN GOTO 211
ON ASC(A$)-ASC("0") GOSUB 4000,5000,
6000 , 7000 , 8000 , 1 000 , 2000
299 GOTO 100
1 000
1010
1020
1030
1040
= 10
1 050
= 10
REM LONG RANGE SCAN
CLS
A=SX-1:C=SX+1
B=SY-1:D=SY+1
IF A<1 THEN A=l
ELSE IF 010 THEN C
IF B<1 THEN B=l ELSE IF D>10 THEN D
43
1055 LOCATE 6,5
1060 FOR L=A TO C
1070 PRINT"**#"CHR$<L+47) "***";
1080 NEXT L
1090 LOCATE 1,6s FOR L=B TO D
1100 PRINT" "JsFOR N=A TO C: PR I NT"*
*": :NEXT N s PRINT
1105 PRINT" "CHR*(L+47>" " 5 : FOR N=A TO
C : PR I NT " * * " ; : NE X T N : PR I NT
1108 PRINT" " JsFOR N=A TO C: PRINT"*
*"; sNEXT Ms PRINT
1110 NEXT L
1120 PRINT" ";:FOR L=A TO Cs PR INT" **
#****"; :NEXT L
1125 LOCATE 4, 1 : PRINT"<stars , bases , k
lingons)-"
1130 FOR L=A TO C
1140 FOR M=B TO D
1 1 45 SOUND 1 , I NT ( RND*500 ) +50 , 1 0
1150 LOCATE 8+(L-A)*7,7+(M-B)*3
1 160 G*=STR* (G (L., M) ) : G*=RIGHT* (G$, LEN (S*
) - 1 ) : G$=R I GHT$ ( " 00 " +G* , 3 )
1165 PRINT G$
1170 NEXT Ms NEXT L
1180 SOUND 2.81,0
1200 LOCATE 6, 21 : PR I NT "< SPACE > to exit"
1210 IF INKE.Y*=" " THEN GOTO 1210
1220 IF INKEY$<>" " THEN GOTO 1220
1299 RETURN
2000 REM SHORT RANGE SCAN
2010 CLS s LOCATE 6, 6: PR INT" **0** 1**2**3**
4**5**6**7**8**9** "
2020 FOR L=0 TO 9s LOCATE 3,L+7
2030 PRINT STR*(L) " *
*"
2040 NEXT L
2050 LOCATE 6, 17
2060 PR I NT " #***##*#*#******#*#*♦****#*##
2065 PAPER Is PEN 0
2070 FOR L=l TO 10: FOR M=l TO 10
2075 SOUND 1 , L*M*4+200, 10
2080 LOCATE 4+L*3,6+M
2090 IF S(L,M>=100 THEN PRINT" * " s GOTO
2 1 40
2100 IF S(L,M)=-1 THEN PRINT"< ! >" s GOTO 2
140
44
2110 IF S(L,M)=10 THEN PRINT" >-<": GOTO 2
140
2120 IF S(L,M)=1 THEN PRINT"<>>"
2130 IF S(L,M)=0 THEN PRINT"
2140 NEXT M:NEXT L
2142 PAPER 0:PEN 1
2145 SOUND &81,0
2150 LOCATE 6, 21 : PR INT" < SPACE)- to exit"
2160 IF INKEY*=" " THEN GOTO 2160
2170 IF INKEY*<>" " THEN GOTO 2170
2199 RETURN
3000 REM SETUP THE GALAXY
3010 DIM G(10,10),S(10,10)
3020 NK>30 : D I M K X ( NK ) , K Y ( NK )
3030 SX=5:SY=5
3040 X=5:Y=5
3060 FOR N=l TO NK
3070 L= I NT < RND (1 ) * 1 0+ 1 ) s M= I NT ( RND ( 1 ) # 1 0+
1)
30S0 G(L,M)=G(L,,M)+1
3090 NEXT N
3100 FOR L=l TO 1 On FOR M=l TO 10
3110 G(L,M)=G(L,M)+100*INT(RND*5)
3120 NEXT M::NEXT L
3130 FOR N=l TO 3
3 1 40 L= I NT ( RND ( 1 ) * 1 0+ 1 ) : M= I NT ( RND ( 1 ) * 1 0+
1)
3150 G(L,M)=G(L,M)+10
3160 NEXT N
3199 RETURN
3500 REM GENERATE THIS SECTOR
3510 F-G(SX,SY) : FOR L=l TO 10
3520 FDR M=l TO 10: S <L, M> =0: NEXT Ms NEXT
L
3530 S(X,Y)=-1
3540 IF P<100 THEN GOTO 3550
3543 F-P-100
3546 L=INT(RND(1)*10+1) : M=INT (RND < 1 ) *10+
1):IF S(L,M)<>0 THEN GOTO 3546
3549 S(L,M) =100: GOTO 3540
3550 IF P<10 THEN KS=P:GOTO 3560
3553 F-P-10
3556 L= I NT ( RND ( 1 ) * 1 0+ 1 ) : M= I NT ( RND ( 1 ) * 1 0+
1):IF S(L,M)<>0 THEN GOTO 3556
3559 S(L,M)=10:G0T0 3550
3560 IF P=0 THEN RETURN
45
3570 P=P-1
3580 L= I NT ( RND ( 1 ) # 1 0+ 1 > : M= I NT ( RND ( 1 ) * 1 0+
1):IF S(L,M)<>0 THEN GOTO 35S0
3590 S ( L , M > = 1 : GOTO 3560
3599 RETURN
4000 REM WARP ENGINES
4010 IF EN<1000 THEN CLS: LOCATE 1,11: PR I
NT"Warp engines out o-f commi ssi on" : FOR L
=1 TO 800: NEXT L: RETURN
4020 CLS: LOCATE 1 , 9: PRINT"SET TARGET SEC
TOR"
4030 LOCATE 6, 13: PRINT" X s , Y :
4040 L=SX-lsM=SY-l
4050 LOCATE 11,13: PR I NT L : LOCATE 1 S ., 1 3 : P
RINT M
4060 A*=INKEY*: IF A*-"" THEN GOTO 4060
4065 IF A*=CHR$(242) THEN L=L 1
4070 IF A*=CHR*<243) THEN L=L+1
4080 IF A*=CHR*(240) THEN M=M 1
4090 IF A*=CHR*<241) THEN M=M+1
4100 IF A*=CHR*(224) THEN GOTO 4200
4110 L=(L+10) MOD 10:M=<M+10> MOD 10
4115 PRINT:PRINT"Energy used :"?:DX=L-(S
X-l) :DY=M-(SY-1) : P=20*INT (DX*DX+DY*DY) :P
RINT P; "
4120 GOTO 4050
4200 IF EN<P THEM PRINT" INSUFFICIENT ENE
RGY REMAINS": FOR L=l TO 800: NEXT L:RETUR
N
4220 FOR N=50 TO 200 STEP 5 .-SOUND 1,N,25
: SOUND 2,N+2,15:S0UND 3, N+4, 10: NEXT' N
4230 PR I NT "YOU ARE NOW IN SECTOR ( "L" ,
II |y| II ^ II
4240 SX=L+1:SY«M+1:F0R L=l TO 800: NEXT L
4250 EN=EN~P:GOSUB 3500: RETURN
5000 REM IMPULSE ENGINES
5010 IF EN<500 THEN CLS: LOCATE 1,11:PRIN
T" Impulse engines out o-f commission" : FOR
L=l TO 800: NEXT L: RETURN
5020 CLS: LOCATE 1 , 9: PR I NT "SET TARGET COO
RD I NATES"
5030 LOCATE 6, 13: PRINT" X : , Y :
5040 L=X~1:M=Y-1
5050 LOCATE 11, 13: PRINT L: LOCATE 18,13:P
RINT M
5060 A*=INKEY*: IF A*="" THEN GOTO 5060
46
5065 IF A*=CHR*(242) THEN L=L-1
5070 IF A*=CHR*<243) THEN L=L+i
5080 IF A*=CHR$(240) THEN M=M~1
5090 IF A*=CHR*(241) THEN M=M+1
5100 IF A*=CHR*(224) THEN GOTO 5200
5110 L=(L+10) MOD 10:M=<M+10) MOD JO
5115 PRINT: PRINT"ENERGY USED: " ; : DX=L-~ ( X~
1) :DY=M-(Y-1> :P=3*INT(DX*DX+DY*DY> : PRINT
p. i.
5120 GOTO 5050
5200 IF EN<P THEN PRINT" INSUFFICIENT FNF
RGY IS LEFT": FOR L=l TO 800: NEXT L:RFTUR
N
5220 PR I NT "YOU HAVE MOVED :"
5230 S < X , Y ) =0 : X =L+ 1 : Y=M+ 1
5240 IF S < X , Y ) < >0 THEN PR I NT : PR I NT " .... I
N FLIGHT COLLISION..." ELSE GOTO 5500
5250 IF S(X,Y)=1 THEN PRINT" .. WITH A KL I
NGON " : EN=EN- 1 500 : GOTO 5500
5260 IF S(X,Y)=10 THEN PRINT" .. WITH A ST
ARBASE":GOTO B500
5270 IF S ( X , Y ) = 1 00 THEN PR I NT " . . W I TH A S
TAR. . " : EN=0: GOTO 5500
5500 S<X,Y>=-1:EN=EIM-P:F0R L=l TO 600: NF
XT L: RETURN
6000 REM PHASERS
6005 DEG
6010 CLS: LOCATE 1 , 9: PRINT"PHASER WEAPONS
II
6020 LOCATE 1 , 1 1 : PRINT"BEARING :
": LOCATE 11, 11: INPUT BR
6030 IF BR<0 OR BRX360 THEN SOUND &81,50
0,50: FOR L=l TO 800: NEXT L:GOTO 6020
6040 LOCATE 1 , 14: PRINT "ENERGY :
": LOCATE 11, 14: INPUT EP
6050 IF EP<0 OR EP>EN THEN SOUND &S 1,400
,50: FOR L=l TO 800: NEXT L:GOTO 6040
6060 TX=X:TY=Y:CX=SIN<BR> :CY=COS(BR)
6080 TX=TX+CX:TY=TY+CY
6085 IF TX<1 OR TX>10 OR TY< 1 OR TY>10 T
HEN GOTO 6200
6090 P=S ( I NT ( T X+0 . 5 ) , I NT ( TY+0 . 5 ) ) : I F F -0
THEN GOTO 6080
6100 IF P=10 THEN PR I NT "YOU JUST DESTROY
ED A STARBASE":G(SX,SY)=G(SX,SY)-10:S(IN
T(TX) , INT <TY) )=0: GOTO 6080
47
6110 IF POl THEM GOTO 6120
6112 PR I NT "YOU HIT A KLINGON"
6.1.15 IF RND(1)*500<EP THEN PR I NT "AND YOU
DESTROYED IT" : G (SX, SY) =G <SX, SY) ~1 : S < INT
(TX+O. 5) , INT (TY+O. 5) ) =0: NK»NK-i : KS=KS--1
6120 GOTO 6080
6200 EN=EN-EP:FOR L=l TO 1000s NEXT L s RET
URN
7000 REM PHOTON TORPEDOES
7010 CLS s LOCATE 1 , 9: PR I NT "PHOTON TORPEDO
ES"
7020 LOCATE 1 , 1 1 : PR I NT "NUMBER TO FIRE :
" : LOCATE 17,11:1 NPUT PP
7030 IF PP<1 OR PP>NP THEN SOUND &8 1,400
,50: FOR L=l TO 800: NEXT L:BOTO 7020
7040 NP=NP--PP
7050 FOR M=l TO PP
7060 PR I NT "PHOTON TORPEDO "M" FIRED AND
RUNNING. ...... "; :FOR L=l TO 10:PRIIMT". ";
: SOUND 1, 15*L+ 100 .-NEXT L:FOR L=l TO 600;;
NEXT L
7065 PRINT
7070 IF RNDCLX0.3 THEM PRINT" IT MISSED.
" : GOTO 7200
7080 IF G(SX,SY)/10==INT(G(SX,SY) /10> THE
N PR I NT "THE TORPEDO RUNS OUT INTO SPACE"
:GOTO 7200
7090 PR I NT "HOMING DEVICES ACTUATED"
7100 A=INT (RND ( 1 ) *1Q+1 ) : B=INT (RND ( 1 ) *10+
1 ) : I F S ( A , B ) <> 1 THEN GOTO 7 1 00
7110 PRINT" YOU HIT A KLINGON": IF RND ( 1 )<
0.75 THEN PR I NT "AND YOU DESTROYED IT":S<
A , B ) =0 : KS=KS- 1 : (3 ( SX , SY ) =G ( SX , SY ) - 1 : GOTO
7200
7120 PR I NT "BUT THE KLINGON11 S DEFLECTORS
REDUCED THE DAMAGE"
7200 NEXT M
7210 FOR L=l TO 800: NEXT L
7299 RETURN
8000 REM DOCK WITH STARBASE
8010 CLS: LOCATE 1 , 6: PR I NT "DOCKING COMPUT-
ER O.S. 0. 1"
8020 PR I NT " =========================:= »
8030 LOCATE 1 , 9: PRINT" . . . A LITTLE UNRELI
ABLE"
8040 LOCATE 1 , 1 1 : FOR L=l TO 20+ I NT (RND <1
) *20 )
48
8050 A= I NT ( RND < 1 ) * 1 0+ 1 ) : B= I NT ( RND ( 1 ) * 1 0+
1)
8060 IF S<A,B>=10 THEN PR I NT "DOCKED SUCC
ESSFULL Y " : EN=5000 : NP= 1 0 : PR I NT : PR I NT " ENER
6Y AND PHOTON TORPS. RENEWED"
8070 NEXT L
8080 FOR L=l TO 800 STEP 4: SOUND i,L,2
8090 NEXT L
8099 RETURN
9000 REM A KLINGON ATTACKS
9010 LOCATE 1,21: PRINT "A KLINGON PHASER
IS FIRED AT YOU"
9013 FOR L=15 TO 0 STEP -1
90 1 5 SOUND 1 , 0 , 1 0 , L , 0 ,0,8: NEXT L
9020 IF RND < 1X0. 4 THEN PRINT" IT MISSES"
:FDR L=l TO 600: NEXT L: LOCATE 1, 21: PRINT
" : RETUR
N
9030 PR I NT " I T H I TS YOU . . . " : DM- I NT ( RND ( 1 )
#300+400) : FOR L=l TO 600: NEXT L
9040 EN=EN-DM
9050 LOCATE 1,21: PRINT"
" : RETURN
10000 REM SHIP HAS BEEN DESTROYED
10010 CLS: LOCATE 1 , 9: PRINT" YOUR SPACE SH
IP HAS RUN OUT OF ENERGY"
10020 PR I NT: PR I NT "YOUR LIFE SUPPORT SYST
EMS HAVE FAILED"
10030 PRINT: PRINT" ALL PASSENGERS AN
D CREW"
1 0040 PR I NT : PR I NT " . . . ARE MISSING ... PRE
SUMED DEAD"
10050 FOR L=l TO 600: NEXT L
10060 PR I NT "THE STARDATE IS : " ; SD
10070 LOCATE 1,21: PRINT" AGAIN (Y/N) ?
II
10080 A*-INKEY*:IF A*<>,,n THEM GOTO 1008
0
10090 A*=INKEY*: IF A*=n M THEN GOTO 10090
10100 IF A*="Y" OR A*="y" THEN RUN
10110 IF A*<>,,Nn AND A*<>"n" THEN GOTO 1
0080
10120 CLS: LOCATE 1,5s END
DRAGON DUNGEON
\ ^CT
^^» •
> '*SBI
We have been saving this monstrous program until the
middle of the book as we didn't want to scare you with it's
length or it's content.
You may have heard of the highly popular Dragons and
Dungeons game but have never played it - until now.
You will begin by finding yourself on the third level of a
dungeon and, should you proceed into the heart of the maze,
you will meet twenty one different types of monsters. Lurking
in the lower depths are trolls, ores, snakes, dwarfs, wolves,
newts, many others and, most horrible of all, a Dragon
capable of inflicting fatal wounds.
On your side you have help, if you can find your way, from a
fire demon and from several types of spells. Be careful how
you use the spells, however, as they can sometimes break
down and leave you deeper in the
50
How to play
Press the first letter of the command of your choice as the new
menu is offered to you.
You will be told of the consequences of your choice and then
you are on your own.
By the way, if you live, a higher score will be given.
The Program
10 REM DRAGON DUNGEON
15 NODE 2
20 GOSUB 2900:G0SUB 1600:1$=""
25 GOTO 100
30 FOR ZQ=1 TO 500: NEXT ZQ: RETURN
100 REN NAIN NEW LOCATION LOOP
110 GOSUB 2500: GOSUB 30
115 IF LV=0 THEN GOSUB 1500: GOTO 900
120 IF MF=1 THEM GOTO 200
130 GOSUB 1000
140 GOSUB 3400: IF I$="L" THEN PRINT"That
sounds interesting": GOSUB 30: GOTO 130
142 IF I*="P" THEN PRINT"ho hum....":GOS
UB 30: PRINT" I a di da...": GOSUB 30:MF=1:P
M=PM+ I NT ( RND ( 1 ) *4 ) : PS=PS+4 : GOTO 200
144 IF I$="T" THEN MM=1 : PRINT"Thi s can b
e a little unpredictable" : GOSUB 30s GOSUB
2800: GOTO 100
150 F=0:FOR L=l TO LEN(MO*):IF MID* (MO*,
L, 1)=I* THEN F=l
160 NEXT L:IF F=0 THEN PRINT"You can't m
ove in that direction" : GOSUB 30: GOTO 130
170 IF I*="U" THEN LV=LV~1 : PRINT" You * 1 1
get out of here yet ": GOTO 195
ISO IF i*="D" THEN 1 v=l v+1 : PRINT" Of f goe
s the hero, in search of yet more advent
ure": GOTO 195
190 PRINT"The road goes ever on, anon."
195 GOSUB 30: GOTO 100
200 REM Monster encountered here
51
210 PR I NT "You just bumped into something
" :G0SUB 30
220 IF RNDdXO. 02 THEM df =2: GOSUB 3000::
PRINT" You' re not going to believe this,
it's the DRAGON" : GOSLJB 30: PR I NT "Have fun
":G0TD
240
230 GOSUB 1700
240 GOSUB 30
250 GOSUB 1100: GOSUB 3400: IF i$<>"S" AND
I*<>"D" AND I*<>"R" AND I*<>"M" THEN GO
TO 250
260 IF I*="S" THEM WP=1: GOSUB 2000
270 IF I*="D" THEN WP=2: GOSUB 2000
280 IF I*="R" AND RNDdXO. 35 THEN PRINT
"You got away -from ":PRINT"the ";DJ*:G0T
0 450
290 IF i*="R" THEN PRINT" You couldn't ge
t away -from it"
300 IF i*<>"M" THEN GOTO 320
310 GOSUB 2200: ON op GOSUB 2800,2700,210
0
320 IF mfOO THEN GOTO 490
330 IF df=2 THEN df=l: GOSUB 1200
340 GOTO 100
450 REM Player left DRAGON wounded
460 IF df=2 THEN df =0: ds=ms: dm=mm
470 GOTO 100
490 IF df=2 THEN df =0: ds=ms: dm=mm
500 REM Monster attacks player
510 GOSUB 3300
520 IF PS<=0 THEN GOSUB 1400 .-GOTO 900
590 GOSUB 30: IF mf >0 THEN GOTO 250
600 IF df=2 THEN df =0: ds=»ms: dm=mm
610 GOTO 100
900 REM End of game routine
999 END
1000 REM Main menu
1010 MODE 2
1020 PRINT"Choose what you want to do"
1040 LOCATE 1 , 5: PRINT"Movement :"
1045 LOCATE 5, 8: GOSUB 2600
1050 LOCATE 5, 12: PRINT"Look "
1060 LOCATE 5, 14s PRINT "Pause"
1070 LOCATE 5, 16: PR I NT "Tel eport "
52
1080 LOCATE 1 , 21 : PRINT" Type the first le
tter of the command of your choice"
1099 RETURN
1100 G0SUB 2500
1110 MODE 2
1120 PRINT"Choose what you want to do"
1140 LOCATE 5, 7: PR I NT "Sword fight"
1150 LOCATE 5,9:PRINT"Dagger fight"
1160 LOCATE 5, ll:PRIMT"Run away"
1170 LOCATE 5, 13: PRINT"Magic spell"
1 1 75 LOCATE 1,16: GOSUB 1 800
1177 LOCATE 1,18: GOSUB 2300
1180 LOCATE l,21:PRINT"Type the first le
tter of the command of your choice"
1199 RETURN
1200 REM Player has killed the DRAGON
1210 MODE 2
1220 LOCATE 1 , 5: PRINT" Wei 1 played brave
knight"
1230 LOCATE 1 , 7: PRINT" You have slain the
foul beast"
1240 LOCATE 1 , 9: PRINT "The Dragon, terror
of your people, has fallen in battle"
1245 GOSUB 30: GOSUB 30
1250 LOCATE 1,12:PRINT"< and your sc
ore hath mysteriously risen )"
1260 sc=sc+200
1270 df=l
1299 RETURN
1400 REM The Player managed to get kille
d
1410 MODE 2
1420 PRIMT"Now comes that moment in the
life of every truly gallant knight"
1430 PRINT: PRIMT"When the court meets fo
r a great feast and all make merry and e
at and drink their fill."
1440 GOSUB 30: PRINT: PRINT" except you
that is "
1450 PRJNT: PRINT" I'm afraid that you jus
t died. "
1460 PRINT: PRINT"You managed to amass th
e truly noble score of " ; sc
1470 LOCATE 1 , 21 : PRINT" Why not try diffe
rent tactics next time"
53
1480 G05UB 30:G0SUB 30:G0SUB 30
1499 RETURN
1500 REM The Player escaped
1510 CLS
1520 PRINT" You' ve clone it, against all o
dels"
1530 PRINT"You've actually escaped -from
the dreadful place"
1540 IF df=0.THEN PR I NT "You didn't 'Quit
e' manage to stay around long enough to
kill the Dragon. ": GOTO 1560
1545 PRINT"You even managed to kill the
foul, cruel and awfully nasty Dragon on
the way out"
1557 PRINT:PRINT"That won't be altogethe
r bad for your bank balance" : GOSLIB 30: PR
INT: PR I NT "or your score"
1558 sc=sc+400
1560 LOCATE 1 , 16: PRINT" YOU HAVE SCORED "
SSC; " points"
1570 PR.INT"Plus a small psychological bo
nus":G0SUB 30: PRINT" You' re alive"
1599 RETURN
1600 REM set RAND variable by maze numbe
r requested
1610 MODE 2
1620 LOCATE 1,11
1630 INPUT "Maze number " ; n
1640 LOCATE 1, 18
1650 PRINT"Write this number down"
1660 PRINT: PRINT"so that you can have th
e"
1670 PRINT: PR I NT "same mane again if you
lose"
1680 RANDOMIZE n
1699 RETURN
1700 REM Choose a random monster
1705 1=3*1 v: IF 1 >20 THEN 1=20
1710 n=INT<RND(l)*l+l) : m=INT (RND ( 1 ) #20+1
)
1720 DJ*=a*(M)+" "+M*(N)
1730 MS=INT<RND(1)*MS(N)+1)
1740 MM=INT(RND(1)*MM(N>+1>
1750 MC=MC(N)
1760 NS=MS+MM*4*MC/100
1799 RETURN
54
1800 REM F'rint monster statistics
1810 PRINT'The ";DJ$;
1820 PRINT" is ";
1830 IF ms<4 THEN PR I NT "nearly dead": GOT
0 1899
1840 IF ms<10 THEN PR I NT "badly wounded";
GOTO 1899
1850 IF ms>ps THEN PR I NT "still dangerous
ll
1860 IF msOps THEN PR I NT "still here"
1899 RETURN
2000 REM reduce MS by player -fighting
2010 PR I NT'" You attack the monster ":R
DSUB 30
2020 I F RND < 1 ) * wp < 0 - 4 THEN PR I NT " . ■ . „ b u
t miss" : GOTO 2099
2030 PRINT". . . . and hit, "
2040 n= I NT (RND ( 1 ) *ps/wp+l )
2050 IF n<>ms/4 THEN PRTNT"causing a srna
11 amount of damage'1 : GOTO 2090
2060 IF n>ms/2 THEN PRINT"causi ng seriou
s damage to the monster"
2070 IF n>=nis THEN PRINT: PRINT"The monst
er dies from it's wounds"
2090 ms=ms-n:IF ms<0 THEN ms=0
2095 IF ms<>0 THEN sc=sc+ns: mf =0: IF df=2
THEN GOSUB 1200
2099 RETURN
2100 REM Reduce MS by player magic
2110 PRINTMWaving your hands and chantin
g": PR I NT "You begin to summon the fire de
mon "
2120 IF RND(l)*pm<mm THEN PRINT"but your
spell is disrupted by your foe":PRINT"a
nd the demon returns" : PRINT"to the hells
where it be
longs": GOTO 2199
2130 PRINT"and gradually the demon forms
around your opponents body"
2135 GOSUB 30
2140 n=INT(RND(l)*pm+l>
2145 ms=ms-ns pm=pm-~n
2150 IF ms<0 THEN ms=0
2160 IF ms=0 THEN PRINT"The ";DI *?" is
slain by the fire demon": LET sc=sc+ns:mf
=0:IF df=2 THEN GOSUB 1200
55
2199 GOSUB 30: RETURN
2200 REM Set Teleport, Heal, Attack menu
2210 MODE 2
2220 LOCATE 2, 6: PR I NT "SELECT TYPE OF SPE
LL"
2230 LOCATE 2, 7: PR I NT "===========«=====»
2240 LOCATE 1 , 1 1 : PRINT"T) el eport "
2250 LOCATE 1 , 13: PRINT "H) eal "
2260 LOCATE 1 , 15: PRINT" A) ttack "
2265 LOCATE 1,1 7: GOSUB 1800
2270 LOCATE 6,19: PR I NT " Pr ess initi a 1 1 e t
ter to select"
2280 BOSUB 3400
2290 op=INSTR ( "THA" , i $>)
2298 IF op=0 THEN GOTO 2280
2299 RETURN
2300 REM Display player characteristics
2310 PR I NT "You are -feeling ";
2320 ON INT(ps/5) GOTO 2340,2350,2360
2330 PRINT"very strong": GOTO 2370
2340 PRINT" very weak": GOTO 2370
2350 PR I NT "weak": GOTO 2370
2360 PR I NT "-fairly strong"
2370 IF pm=0 THEN PRINT"and you have no
magic le-ft":G0T0 2399
2380 IF pm<5 THEN PRINT" You' re running o
Lit o-f magic"
2399 RETURN
2400 REM Read names and adjectives
2410 RESTORE 9000
2420 FOR 1=1 TO 20
2430 READ a$(L):NEXT 1
2450 FOR 1=1 TO 20
2460 READ m* CD: NEXT 1
2470 FOR 1=1 TO 20
2480 READ ms ( 1 ) , mm ( 1 ) , mc ( 1 )
2490 NEXT 1
2499 RETURN
2500 REM Generate MO* movement string
2505 IF 1*="" THEN I*="F"
2510 FOR 1=65 TO ASC ( i *) : a=RND ( 1 ) : NEXT 1
2520 IF RND(1><0.3 THEN mo$="N" ELSE mo*
-_. II II
2530 IF RNDUK0.3 THEN mo$=mo$+"S" ELSE
nio$=mo$+" "
56
2540 IF RND (1X0. 3 THEM mo$=mo$+"E" ELSE
mo$=(no$+" "
2550 IF RND (1X0. 3 THEM M0*=M0*+" W" ELSE
M0*=M0*+" "
2560 IF RND (1X0. 07 THEN M0*=M0*+"U" ELS
E M0*=M0$-f-" "
2570 IF RND (1X0. 07 THEN M0*=M0*+"D" ELS
E MQ*=M0*+" "
2580 IF MQ*=" " THEN GOTO 2520
2590 IF RND (1X0. 4 THEN MF=1
2599 RETURN
2600 REM DESCRIBE LOCATION EXITS
2610 PR I NT "You can move : " ; mo*
2699 RETURN
2700 REM Player chose the Heal spell
2710 PRINT"You being to heal yourself"
2720 1=INT(RND<1>*3+1)
2730 IF 1=1 THEN PRINT"but your spell la
cks something"
2740 IF 1=3 THEN PR I NT "wow ! what a powe
r-ful healing spell"
2750 n=INT(RND(l)*pm+l)
2760 ps=ps+n*l : pm=pm-n
2770 IF pm=0 THEN PR I NT "You have used up
all your magic"
2799 RETURN
2800 REM Teleport out of battle routine
2810 IF RND(l)*pm<mm*1.5 THEN PR I NT "Your
teleport spell -fails": GOTO 2899
2820 PRINT" Your material -form shimmers a
nd then vanishes"
2830 GOSUB 30: PRINT"You re-appear somewh
ere else"
2840 RANDOMIZE TIME
2850 PRINT"The surroundings look strange
ll
2860 IF RND<0.4 THEN PRINT"You've moved
•further down into the dungeon ": 1 v = l v+INT
(RND(1)*4+1)
2870 m-f=0
2880 IF df=2 THEN d-f=0
2899 RETURN
21900 REM Setup all variables/arrays
2920 DIM a*(20),m*(20)
2930 DIM ms(20) ,mm(20) ,mc (20)
2940 GOSUB 2400
57
2945 dm=30:dc=75sds=25
2950 df=0
2960 ps=203pm=20
2970 sc=0:lv=3
2980 mf»0
2999 RETURN
3000 REM Transfer DRAGON statistics
3010 fnm=dm: mc=dc: ms=ds
3040 ns=0
3050 DJ*="awe inspiring, horrendous Drag
on"
3099 RETURN
3100 REM the monster attacks (fighting)
3105 PR I NT" The monster claws and bites a
t you": GOSUB 30
3110 IF RND(1)<0.4 THEN PR I NT" but misses
you": GOTO 3199
3120 PRINT"and hits you"
3130 n=INT(RND(l)+ms+l)
3140 ps=ps-n:IF ps<0 THEN ps=0
3150 IF ps<5 THEN PRINT" You" re getting p
retty badly hurt " : PRINT"better watch you
r step"
3199 RETURN
3200 REM the monster attacks (magically)
3205 PR I NT" The monster begins to summon
a demon": GOSUB 30
3210 IF RND(l)*mm<pm THEN PRINT" the demo
n of cold is bani shed ": GOTO 3299
3220 n = INT(RNDU)*mm+l)
3230 ps=ps~n:mm=mm-n
3240 IF ps<>0 THEN ps=0: PRINT" You froze,
ii
V • • ■
3250 IF ps<5 THEN PRINT "You" re nearly de
ad"
3260 IF ps>=5 THEN PR I NT " Br rr. That was
chi 1 1 y"
3299 RETURN
3300 REM Choose monster attack type
3310 IF RND(l>*ps>10*RND(l)*ms THEN PRIN
T"The monster runs away from you":mf=0:s
c=sc+ns:G0T0 3399
3320 IF RND(l)*100<mc THEN GOSUB 3200: GO
TO 3399
3330 GOSUB 3100
3399 RETURN
58
3400 REM Read a character from KBD:
3420 i*=INKEY*
3425 IF i$:::^"an AND i$<>MzM THEN i *=CHR*
( ASC (i *) -ASC ( "a" ) +ASC ("fi"))
3430 IF i$<"A" OR i*>"Z" THEN GOTO 3420
3499 RETURN
9000 DATA vicious, nasty, enormous, violent
9001 DATA si y,undead, beaut i ful , evi 1
9002 DATA rotting, si imy, armoured
9003 DATA terrible, -foul ', bloody
9004 DATA fearsome,, hypnotic , dangerous
9005 DATA sadi sti c , cruel , pi ti ful
9010 DATA ore, kob old., newt, wolf
9015 DATA eagle, dwarf , trol 1 , balrog
9020 DATA el f , wi ght , ki ng , bear
9025 DATA black r i der , snake, devi 1 , wi 1 1 o
•" the wisp
9027 DATA si ime, giant , venus flower, blowf
iy
9030 DATA 1 0 , 0 ,0,5, 20 ,75,1,50,1 00 , 20 , 0 , 0
9040 DATA 15,5,20,15,0,0,30,0,0,15,20,50
9050 DATA 10,40,25,40,100,2,30,10,20,35,
0 , 0
9060 DATA 20 , 40 ., 0 ,10, 0 ,0,4,20, 40 , 20 ,70,1
0
9070 DATA 4 , 0 , 0 , 35 , 0 , 0 , 20 , 10, 30 ,10,1 0 , 75
SNIPER
As you will know, your Amstrad can produce figures for use in
many of your games programs. We have used him here, but
not in the nicest way.
He is running for his life.
The figure will appear on the screen, sometimes for a few
seconds, sometimes for a split second, and you must line up
your rifle and bring him down before he vanishes again.
It's not nice, as we said, but then again he might be an
advance man from a foreign planet and we all know what a
nuisance they can be.
How to play
When the character appears use ARROW keys to move and
the COPY key to fire.
60
The program
10 REM SNIPER
20 ENV 1,8,-1, 1
30 ENT 1,8, 1, 1
40 ENV 2 , 30 ,-3,10,15,-2,5
50 DEFINT A-Z
60 BASE*=" "+CHR* (160)+" "
70 SPIES=0
80 HITS=0
90 SPYFLAG=0
100 SPYCH=250
110 REM NEW SNIPER LOOP
120 MY=0
130 BASE=10
140 MODE 0
150 LOCATE 1,25
160 PAPER 7: PEN 4
170 FDR Q=l TO 20
180 PRINT CHR*(127) ?
190 NEXT Q: PAPER 0
200 BORDER 5
210 INK 2,7
220 PEN 11
230 LOCATE BASE- 1 , 24: PRINT BASE*;
240 REM MAIN LOOP
250 IF MYOO THEN GOSUB 580
260 FLAB=0
270 IF INKEY(8)=0 AND BASE>2 THEN BASE-B
ASE-1:FLAG=1
280 IF IMKEY(1)=0 AND BASE- 19 THEN BASE-
BASE+1:FLAG=1
290 IF FLAG=1 THEN PEN 1 1 : LOCATE BASE-1,
24: PRINT BASE*;
300 IF INKEY (9)=0 AND MY-0 THEN MY=23:MX
=BASE : SOUND 1 30 ,0,50,15,2,0,15
310 GOSUB 410
320 IF SPIESO10 THEN GOTO 240
330 REM ALL SPIES RUN AWAY OR SHOT
340 CLS:PRINT"ALL SPIES HAVE BEEN KILLED
II
350 LOCATE 1 , 5s PRINT" YOU HIT ";HITS;" OF
THEM"
360 IF HITS>8 THEN PRINT" ( there may
be a medal in this for you )"
61
370 IF INKEY*=" " THEM GOTO 370
380 IF INKEY$<>" " THEN BOTO 380
390 RUN
400 END
410 REM PERFORM SPY ACTIONS
420 IF SPYFLAG=1 THEN GOTO 460
430 IF RND(1)>0.007 THEM RETURN
440 SPYPOS---- 1 NT ( RND ( 1 ) # 1 0 ) +6 : SPYD I R= 1 : I F
RIMD(l) >0.5 THEN SPYDIR=-1
450 GOTO 570
460 REM SPY IS PRESENT
470 IF SPYP0S=1 OR SPYP0S==19 THEN LOCATE
SPYPOS+ 1 , 5 : PR I NT " " ", : GOTO 560
480 IF RND<1)>0.09 THEN GOTO 550
490 SOUND 1,0,10,3,1,1,6
500 SPYPOS-SPYPOS+SPYD I R
510 LOCATE SPYP0S,5
520 PEN 3
530 SPYCH=501-SPYCH
540 PRINT " ";CHR$(SPYCH) 5 " "?
550 RETURN
560 PR I NT " " ; : SP I ES=SP I ES+ 1
570 SPYFLAG=1~SPYFLAG: RETURN
580 REM MOVE MISSILE UP
590 LOCATE MX, MY: PRINT " ";
600 MY=MY-1
610 IF MY=0 THEN RETURN
620 LOCATE MX, MY
630 IF MX=SPYP0S+1 AND MY=5 THEN HITS=HI
TS+1:PRINT " " ; : SPYFLAG=0: MY=0: SOUND 3,2
00+20*SPIES, 15: SPYPOS=0: RETURN
640 PEN 9: PRINT CHR*(148);
650 RETURN
WAR PLAN
Twenty enemy units are 'hidden' on the screen and must be
'knocked' out by your missiles in as few shots as possible. You
have only fifty missiles so you will have to use them sparingly,
and accurately, or you will be over-run by the opposition.
If, after firing, you have not hit your target you will receive
intelligence reports from your forward observers in the field.
Your forward troops will only be able to 'search' eight
surrounding squares after a miss but, if you make a direct hit
then twenty four surrounding squares will be scanned for
further enemy targets.
How to play
Use the letter and number keys to define the co-ordinates you
have chosen and the ENTER key to launch your missiles.
63
The program
10 REM WAR-PLAN
20 GQSUB 380
30 SYMBOL AFTER 129
40 SYMBOL 129,0,32,96,120,96,112,136,112
50 SYMBOL. 130,0,0,0,0,0,0,0,0
60 SYMBOL 131, 0 , 62 ., 62 , 62 , 32 , 32 , 32 , 32
/O SYMBOL. 1 32 , 0 ., 1 36 , 80 , 32 , 32 , 32 , 80 , 1 36
80 GOSUB 440
90 GOSUB 510
100 GOSUB 860
110 GOSUB 1010
120 GOSUB 1170
130 IF NME<X,Y)=0 THEN GOSUB 1210: GOTO 1
60
140 IF NME(X,Y>=-1 THEM GOSUB 1240: GOTO
160
150 GOSUB 1320
160 IF NME<X,Y)=0 THEN GOSUB 1460 ELSE G
OSUB 1380
170 SR=SR-1:IF SR>0 THEN M*="You have "+
STR$(SR>+" shots left": GOSUB 630: PRINT
180 IF SR>0 AND ER>0 THEN GOTO 110
190 REM PLAYER IS OUT OF SHOTS
200 REM OR HAS DESTROYED ALL NME UNITS
210 IF ER=0 THEN GOSUB 1540: GOTO 90
220 M$="Central Office advises you.":GOS
UB 630: PRINT
230 M$="You have used up all our missile
s": GOSUB 630: PRINT
240 M$="This is where the enemy was hidi
ng": GOSUB 630: PRINT
250 WINDOW 1,40, 1,20s GOSUB 930: WINDOW 1,
40,21,25
260 M$="You have scared : "+STR* (sc) s GOSU
B 630: PRINT: FOR L=l TO 1000: NEXT L
270 IF SOHS THEN M$="Which is the high
score": GOSUB 630: HS$=N$: HS=SC: PRINT
280 REM Ask IF PLAYER WANTS ANOTHER GAME
290 WINDOW 1 , 40, 1 , 25: CLS: LOCATE 1,11
300 M*=" Commander "+HS*+" has the high s
core": GOSUB 630
64
310 LOCATE 1, 13: M$=" Which is "+STR*(hs)+
" points" sGOSUB 630
320 LOCATE 1,17s LET M$="Does anyone want
another game <Y/N> ?":G0SUB 630
330 I*=INKEY*: IF I*<>"" THEN GOTO 330
340 I*=INKEY4»: IF 1*="" THEN GOTO 340
350 IF l*="y" OR I*="Y" THEN GOTO 80
360 IF I*="n" OR I*="N" THEN WINDOW 1,40
, 1,25:CLS:EIMD
370 GOTO 330
'380 REM SET UP FOR A NEW GAME
390 HS«0:HS*=""
400 MODE 1
410 BORDER 13
420 DIM NME (14, 24)
430 RETURN
440 REM SET UP FOR A NEW PLAYER
450 WINDOW 1,40, 1,25
460 SC=0:CLS
470 LOCATE 6, 1 1 : PRINT" What is your name
II n
480 INPUT n*:IF N$="" THEN GOTO 470
490 WV=1
500 RETURN
510 REM SET UP FOR NEW WAVE
520 WINDOW 1,40, 1,25: CLS: LOCATE 1,9:M*="
Commander "+N$+" . " : GOSUB 630
530 LOCATE 1 , 1 1 : M$="Central Office advis
es you. ":GOSUB 630
540 LOCATE 1 , 13: M*=" Attack enemy immedia
tely. "sGOSUB' 630
550 LOCATE 1 , 15: M*="Repeat , ATTACK. ATTA
CK. ":GOSUB 630
560 LOCATE 1 , 21 : M$=" " : FOR L=l TO 10:M*=M
*+CHR*(10):NEXT L:GOSUB 630
570 FOR X=l TO 14: FOR Y=l TO 24:NME(X,Y>
=0:NEXT Y:NEXT X
580 ER=20:F0R L=l TO ER
590 X=INT(RND(l)*10+3) : Y=INT (RND ( 1 ) *20+3
) : IF NME ( X , Y)< >0 THEN GOTO 590
600 IF L<3* THEN NME(X.,Y>=-1 ELBE NME ( X , Y
)=1
610 NEXT L:SR=50
620 RETURN
630 REM Teletype emulator
640 FOR L=l TO LEN<M*>
65
650 PRINT MID*(M*,L,1)5
660 SOUND 1,0,5,7,0,0,10: SOUND 1,0, 3
670 IF SQ(1) >127 THEM GOTO 670
680 NEXT L
690 RETURN
700 REM SCAM LOCALLY
710 NN=0
720 FOR X=TX--1 TO TX+1
730 FOR Y=TY-1 TO TY+1
740 NN=MN+ABS ( MME ( X , Y ) )
750 NEXT Y:NEXT X
760 NN=NN~AB5<NME<TX,TY> )
770 RETURN
780 REM SCAN LARGER AREA
790 NN=0
800 FOR X=TX-2 TO TX+2
810 FOR Y=TY~2 TO TY+-2
820 NN=NN+ABS (NME ( X , Y) )
830 NEXT Y:NEXT X
840 NN=NN-ABS(MME(TX,TY) )
850 RETURN
860 REM LABEL MAP AREA
870 W I NDOW 1 , 40 , 1 , 20 : CLS
880 LOCATE 12, 1 : PRINT" 1 1 1 1 1 1 1 1 1 12" : LOCAT
E 3 , 2 : PR I NT " 1 234567890 1 234567890 "
890 LOCATE 1,3
900 FOR L=ASC("A") TO ASCC'J")
910 PRINT CHR$(L) :NEXT L
920 RETURN
930 REM FILL IN ALL MME UNITS
940 FOR X=3 TO 12
950 LOCATE 3,X
960 FOR Y=3 TO 22
970 PRINT CHR*(130+NME<X,Y) ) 5
980 NEXT Y
990 NEXT X
1000 RETURN
1010 REM GET A LEGAL SHOT
1020 WINDOW l,40,21,25:M*="Enter target
far missile? " : GOSUB 630: PRINT
1 030 X= 1 : A= 1 : B=0 : C= 1 : W I NDOW 1 , 40 , 1 , 20
1040 LOCATE 1 1 , 15: PRINT" C " J CHR* (64+X) ! "
"5A+B5" 1 "i
1050 I*=INKEY*:IF
1060 I*=INKEY*sIF
1070 IF I*<"0" OR
I*<>"" THEN GOTO 1050
I $=•••• THEN GOTO 1060
I*>"9" THEN GOTO 1100
66
1080 IF C=l THEN B=A*10: A-ASC ( I*> --ASC < "0
"):£>0:G0T0 1040
1 090 C= 1 : B= A* 1 0 : A=ASC ( I $ ) -ASC ( " 0 " ) : GOTO
1040
1100 IF I*=CHR*(13) THEM GOTO 1140
1110 IF I*>="a" AND i*<="j" THEN i*=CHR*
( ASG ( i * ) -ASC ( " a " ) +ASC ("A"))
1120 IF i*<"A" OR I*>"J" THEN PRINT CHR*
(7) 5 :GOTO 1040
1 1 30 X = ASC ( I * ) -ASC ( " A " ) + 1 : GOTO 1 040
1140 Y=A+B+2:X=X+2:IF X=2 OR Y<3 OR Y>22
THEM ft= i . b=0 : X=0 : PR I NT CHR* ( 7 ) ; : GOTO 1 0
30
1150 LOCATE 11, 15: PRINT"
5 : WINDOW 1,, 40,21,25
1160 RETURN
1170 REM UPDATE MAP
1 1 80 W I MDOW 1,40,1, 20 : LOCATE Y , X : PR I NT C
HR$(132> 5
1190 WINDOW 1,40,21,25
1200 RETURN
1210 REM PLAYER MISSED
1220 M*="The missile missed the enemy" :G
OSUB 630: PRINT
1230 RETURN
1240 REM PLAYER HIT A COMMAND BASE
1250 M*="You have hit the command base":
GOSUB 630: PR I NT
1260 IF er>2 THEN m$="...but it is not d
estroyed": GOSUB 630: PRINT: GOTO 1310
1270 M*="..» and you destroyed i t ": GOSUB
630: PRINT
1 280 SC=SC+500
1290 NME(X,, Y)=0
1300 ER=ER-1
1310 RETURN
1320 REM PLAYER HIT AN ENEMY UNIT
1330 NME(X,Y)=0
1340 M*="You have hit an enemy unit":GQS
UB 630: PRINT
1350 M*="and it is destroyed" : GOSUB 630::
PRINT: ER=ER-1
1360 SC=SC+20
1370 RETURN
1380 REM SEARCH AROUND NEARBY
67
1390 M*=" Intel 1 i gence reports :
" +CHR$ (13) +CHR* ( 1 0 )
1 4 0 0 t x ~ x :TY=Y:G0SUB 7 0 0
1410 IF NN=0 THEN M*=M*+nno nearby activ
ity"
1420 IF nn>0 AND nn<Z THEN m* = m*H-nA smal
1 amount of nearby activity"
1430 IF nn>=-3 THEN m*=m*+nA large amount
of nearby activity"
1440 WINDOW 1,40, 2 1,25: GOSUB 630s PRINT
1450 RETURN
1460 REM search around after a hit
1470 m*=" Intel li gence reports :
"+CHR*(13)+CHR*(10>
1480 t>c=x::ty=y: GOSUB 780
1490 IF nn=0 THEN M$=M$+Mno local ac tivi
ty"
1500 IF nn>0 AND nn<6 THEN m*=m*+"a smal
1 amount of local activity"
1510 IF nn>5 THEN m*ssm*+"a largo? amount
of local activity"
1520 WINDOW 1,40, 2 1,25: GOSUB 630s PRINT
1530 RETURN
1540 REM PLAYER HAS WIPED OUT A WAVE
1 550 W I ND0W 1 , 40 , 1 , 25 : CLS
1560 LOCATE 1 , 1 1 : M*=MCental Office advis
es you. n : GOSUB 630
1570 LOCATE 1 , 13: m*="Farthcoming enemy c
OLinterattack. " : GOSUB 630
1580 LOCATE 1 , 15s m$="Prevent at all cost
s. ": GOSUB 630
1590 LOCATE 1 , 19: m*==" Your score so far i
s : "+STR*(sc)+n points. ": GOSUB 630
1600 LOCATE 1 , 21 : m*=" " : FOR 1=1 TO 10:m*=
m*+CHR*(10) :NEXT 1 : GOSUB 630
1610 RETURN
S.I.M.P.E.R.
At last, you say, in a computer book there must be an acronym
somewhere because the whole business is full of Poke, Peek,
Byte and Ram. Well, our title stands for Semi Intelligent
Machine Psychologist with Extendable Response.
What, you ask, has that got to do with the time of day?
We will explain.
This is your chance to use your computer to make fools out of
all your friends, party guests, loved? ones etc. Your
SIMPERING Amstrad will ask questions and respond to your
answers with 'semi-intelligent' comments. Can you take the
risk?
How to play
Your computer will ask you to enter statements about
yourself.
69
Type in your comments, making them as long as possible,
and your Amstrad will make it's considered comment on your
character.
It's a little like having a 'shrink' at home.
Programming Hints
We have given you a selection of appropriate data (words)
that might make fun for your family but you can change, add
or delete these lines and cause fun and games at your next
party.
If you have added a memory expansion unit to your computer
you can add to the data statements from lines 520 onwards
and give the computer a much wider choice of response.
The Program
10 REM S. I.M.P.E.R.
20 Q*="Hello. My name is SIMPER, I'm her
e to discuss your problems. Why do you e
njoy life ?"
30 bs=G
40 os=0
50 PRINT q*: PRINT
60 INPUT a$:IF a$="" THEN GOTO 50
70 IF LEFT* (a* ,3)=" YES" THEN PR I NT" At la
St, some determination" : q$="Do you often
behave quite so firmly ?" : GOTO 50
80 IF LEFT*<a*,6)="PARDQN" OR LEFT*(A$,2
>="EH" OR A*«="WHAT" THEN GOTO 50
90 IF A*=*"N0" THEN PR I NT "Short and to th
e point" : IF 0S=0 THEN PRINT"Give me some?
thing to go on": GOTO 50
GOSUB 300
UOO THEN GOSUB 360: GOTO
0SO0 THEN U=0S:0S=0:G0SU
1 00
GO!
BUI
3
250:
110
A*=
r: n
>i .
+-A*
120
IF
V*
=0
AND
50
1 30
IF
V-
=0
AND
B 360: GOTO
50
70
140 IF V=0 THEM GOSUB 460: GOTO SO
150 GOSUB 410:0S=U
160 GOTO 50
170 REM SEARCH FOR T$ IN A$
1B0 F=0
190 IF A*=T$ THEN F=l: RETURN
200 IF LEN(A*XLEN(T*) THEN RETURN
210 FOR L=l TO LEN<A*)-LEIM(T*)+1
220 IF MID*(A*,L,LEN(T*>)=T* THEN F=l
230 NEXT L
240 RETURN
250 REM RETURN VERB NUMBER IN V
260 V=0: RESTORE 520
270 READ NnREAD T$:FOR Q=l TO N
280 READ T*: GOSUB 170: IF F=l THEM V=Q
290 NEXT Q: RETURN
300 REM RETURN NOUN NUMBER IN U
310 U=0: RESTORE 550
320 READ N:READ T*:FOR Q=l TO N
330 READ T$: GOSUB 170: IF F=l THEN U=Q
340 NEXT 0.
350 RETURN
360 REM FIND REPLY SENTANCE
370 RESTORE 790
380 FOR L=0 TO ( U- 1 ) *3+ I NT ( RND ( 1 ) *3 )
390 READ Q*:NEXT L
400 RETURN
410 REM CHOOSE SENTANCE.
420 RESTORE 590
430 FOR L=0 TO ( V-l ) *3+INT (RND ( 1 ) *3)
440 READ Q$:NEXT L
450 RETURN
460 REM CONJURE UP A RESPONSE
470 BS=BS+1:IF BS=7 THEN PRINT"SORRY ...
YOUR TIME IS UP": PR I NT: PR I NT: PR I NT: PR IN
T:END
480 RESTORE 980
490 FOR L=l TO BS
500 READ Q*:NEXT L
510 RETURN
520 DATA 8
530 DATA !
540 DATA LOVE , HATE , OWN , WANT , FLY , WALK , TAR
E,BIVE
550 DATA 9
560 DATA !
71
570 DATA CAR , COMPUTER, HOLIDAY , MONEY,, TEL F
, MUSIC, VIDEO, FOOD, FISH
580 REM REPLY DATA
590 DATA How do you know that it's love?
600 DATA What does it -feel like to be in
1 ove ?
610 DATA Why do you think you fee] like
that ?
620 DATA Are you sure that you "re not he
ing over hasty ?
630 DATA Well i f you're sure about it th
en it's good for you
640 DATA Is this -feeling very intense. D
o you really mean it ?
650 DATA That's very progressive of you,
wouldn't 'CARE FOR' be a better way of'
putting it ?
660 DATA But do you own your soul . or ha
ve you traded it with consumer society ?
670 DATA Please clarify yourself. Love o
r want. The first is more polite.
680 DATA That's very impulsive
690 DATA I Want.... I Want... Belloc has
a suprise for you
700 DATA Do you sometimes wish that you
could fly. Aeroplanes are so expensive.
aren't they ?
710 DATA Fly me to the moon,,. „ Do you thi
nk that you'd enjoy that ?
720 DATA Nothing beats shank's pony, wal
king is very good exercise
730 DATA It might be quicker by car
740 DATA Perhaps if you said please firs
t it might help, Your ' e showing that pro
gressive trait again
750 DATA How would you take that ?
760 DATA Giving is good for the characte
r. Do you do a lot of it ?
770 DATA Christmas is a time for giving
780 DATA Do you recieve more than you gi
ve ? Be honest.
790 DATA Do you like fast cars, are you
good mechanically, do you like motorways.
They're too fast for me
800 DATA You obviously like computers. I
72
can tell that you are a natural at the?
keyboard »
810 DATA Do computers worry you in any w
ay ?, Isn't it a bit unnerving talking to
a camp ut er 1 i k e t his ?
820 DATA Would you please take me with y
ou an your holiday- That's a great way t
o get away from it all
830 DATA Do you like to go abroad, or pe
rhaps you prefer to stay at home
840 DATA Money is everyone's favourite p
roblem. Talking of money I have these ra
ther large fees-...
850 DATA How do you earn you money. Are
you by any chance a fortune teller ?
860 DATA What it must be to be a million
aire. All that caviar* It's enough to ma
ke anyone ill.
870 DATA I'm worried about the profusion
of tele-this and tele-that devices-
880 DATA Where do you watch television m
ost often
890 DATA Are you addicted to television.
Like some people I know
900 DATA what type of music do you like
best., I used to adore Simon and Garfunke
1. What do you think of them ?
910 DATA So much modern music is too lou
d. I get lots of cases who are disco-goe
rs.
920 DATA Do you have a video recorder at
home ?,how long hve you had a video ?
930 DATA If you video too much then you
won't have any time to notice the real w
or 1 d
940 DATA So you eat too much do you, foo
d is all very well but you musn't be obs
essed with it. You'll get fat.
950 DATA What's your favourite meal ?
960 DATA Would you like to talk about fi
sh, how about same nice fish and chips
970 DATA Have you ever spent a day fishi
ng by the river and not caught anything
*-)
980 DATA Tell me more about your talents
. Do you play the concert piano ?
73
990 DATA What kind o-f hobbies have you. g
at.
1000 DATA Where do you work ? or do you
still go to school or college ?
1 0 1 0 DATA How about a bi t of word assoc i
at ion- +++ MATHS +++ ?
1020 DATA What does the word •" MACKEiREL :'
suggest to you ?
1030 DATA I'm a -f raid that I will have to
leave you in a -few moments. I'm expecti
ng a very important client.
WORD SQUARE
m
^_ — * — -, — , mm
■Z * _ "■
jj rw h
, — -, — , . — __
This program is designed to test the wits of members of your
circle who think they are keen of eye and sharp of brain.
The screen will generate a square of alphabet which will
contain hidden words. The words can be written horizontally,
vertically, diagonally and even backwards.
How to play
When you have identified a word type in the answer and press
ENTER. You should note that you may identify small words
such as 'of and 'for' which appear simply because of the
structure of the screen, but are not actually acceptable to the
computer.
75
Programming Hints
To make the program challenging you should have someone
else enter the data words which are in the end of the program.
Otherwise you will, of course, know the words you are
seeking.
The Program
20
30
40
50
60
70
10 REM WORDSQUARE
MODE 1
BORDER 13
GDSUB 500
DIM P(10) , X (10) , Y(10)
DIM S$(255) , T*(255)
DIM W(10)
SO 60SUB 6B0
90 GOSUB 1030
100 FOR L=l TO 10:W(L)=0
110 NEXT L.
120 SC=0
130 GOTO 160
140 LOCATE 1,22: PR I NT" BE SENSIBLE"
150 FOR L=l TO 1500: NEXT L
160 LOCATE 1,23: PRINT" Your Guess
170 LOCATE 12,23
ISO INPUT A*
190 IF LEN(A*>=0 OR LEM(A$)>10 THEM GOTO
140
200 LOCATE 1,22
210 PRINT"
220 GOSUB 1180
230 IF F=0 THEN LOCATE 1 , 22:: PR INT "Not th
ere": GOTO 400
240 SC=SC+1
250 REM HIGHLIGHT THE WORD WHICH HAS BEE
N FOUND
260 IF W(F)=1 THEN LOCATE 1 , 22: PRINT" You
've already had that word": GOTO 400
270 W(F)=1
230 B=INT(P(F)/15)
76
290 A=P(F)-15*B
300 FOR L==l TO 0
310 LOCATE A+6,B+3
320 GOSUB 640:D*=CHR*(DD>
330 LOCATE A+6,B+3:PEN 2
340 PRINT D*S
350 PEN 1
360 A=A+X(F) :B=B+Y(F)
370 NEXT L
380 IF SC=10 THEN GOTO 430
390 LOCATE 1 , 23: PRINT" Wei 1 done "sSC;" c
orrect so -far"
400 FOR L=l TO 2000: NEXT L
410 LOCATE 1,23: PRINT"
II
420 GOTO 160
430 REM Here when all ten are -found
440 CLG
450 LOCATE 1,11
460 PRINT"Well done... you found them all
II
470 IF INKEY$<>"" THEN GOTO 470
480 IF INKEY*="" THEN GOTO 480
490 END
500 REM PUT MACHINE CODE JUST ABOVE RE-A
D JUSTED HI MEM
510 MEMORY 39000
520 MC=HIMEM+1
530 TA=HIMEM+&7F
540 TH=INT(TA/256)
550 TL=TA-256*TH
560 POKE MC,&CD
570 POKE MC+ 1,^60
580 POKE MC+2,&BB
590 POKE MC+3,&32
600 POKE MC+4,TL
610 POKE MC+5,TH
620 POKE MC+6,8<C9
630 RETURN
640 CALL MC
660 DD=PEEK(TA)
670 RETURN
680 REM READ IN DATA AND STORE IN
690 LOCATE 1 1 , 1 1 : PR I NT " ONE MOMENT "
700 5*=""
710 FOR L=l TO 15
77
720 S$=S*+"
730 NEXT L
740 RESTORE 1270
750 FOR 1=1 TO 10
760 READ N*
770 N=LEN(N*)
780 N*=RIGHT*<N*,N)
790 ON I NT ( RND*8 > GOSUB 1 1 00 ,1110,11 20 , 1
130, 1 140, 1 150, 1 160, 1 170
800 A=INT(RND<1)*15> : B=INT (RND < 1 > *15)
810 C=A+X(I)*N
820 D=B+Y ( I > *N
830 IF C<0 OR D<0 OR C>14 OR DM4 THEM G
OTO 790
840 L»-l
850 L=L+1
860 D=1 + (B+Y ( I ) *L) *15+A+X < I ) *L
870 Q*=MID*(S*,D, 1)
880 IF Q*=" " THEN GOTO 900
890 IF Q*OMID*(N*,L+l, 1) THEN GOTO 790
900 IF LON-1 THEM GOTO 850
910 FOR L=0 TO N--1
920 Q=i + <B-i-Y < I ) *L> *15+A+X < I ) *L
930 S*=LEFT$ (S$, Q-l ) +MID* (N$, L+l , 1 ) +MID*
<S*,Q+1>
940 NEXT L
950 P<I)=A+B*15
960 NEXT I
970 T*=""
980 FOR L=l TO 255
990 IF MID*(S$,L,1>=" " THEN T*=T*+CHR* (
INT (RND ( 1) #26+65) ) ELSE T*=T$+MID$ (S*, L,
1)
1000 NEXT L
1010 S*=T*:T*=""
1020 RETURN
1030 REM DISPLAY SQUARE
1040 CLS
1050 FOR L=0 TO 14
1060 LOCATE 6,L+3
1070 PRINT MID$(S$,L*15+1, 15)
1080 NEXT L
1090 RETURN
1 100 X < I ) =-1 : Y ( I > =-1 : RETURN
1110 X(I)=1:Y(I)=1:RETURN
1 1 20 X(I)=-1:Y(I)=1: RETURN
78
1 1 30 X ( I ) = 1 s Y ( I ) =-- 1 s RETURN
1 1 40 X ( I ) =: 1 :: Y ( I ) =0 :: RETURN
1 1 50 X ( I ) =0 s Y ( I ) = 1 : RETURN
I 1 60 X ( I ) ^ 1 s Y ( I ) =0 : RETURN
1 1 70 X ( I ) =0 s Y ( I ) =- 1 s RETURN
II £30 REM CHECK IF RESPONSE IS VALID
1190 RESTORE 1270
1200 F=0
1210 FOR L=l TO 10
1220 READ N$
1230 IF N*=A* THEN F=L: 0=LEN (N*>
1240 NEXT L
1250 RETURN
1260 REM WORD LISTS
1270 DATA AMSTRAD, VIDEO,, COLOUR
1280 DATA SOUND .GRAPHICS .GAMES
1 290 DATA MONT I OR , PLAY , COMPUTER
1300 DATA WATER
FAST TYPER
How are your reactions, your spelling and your keyboard
skills? On your screen you will see a fast moving, ever
changing colour background moving from left to right across
the line of your vision.
In the middle of this screen will pop up the word which you
have to copy type on the screen to stop the computer.
How to play
You simply type in the word, without pressing any Enter keys,
in as quick a time as possible to achieve the highest score.
Programming hints
If you find the words in lines 450 and 460 too simple, or even
too difficult, you can change them to suit your own needs. All
you need to do is to enter your own data, remembering to
change line 440 if you increase the number of words from 8.
80
If you wish to change the length of the words then remember
to change the number 6 in line 170 to the appropriate length
of the new words you wish to insert.
The program
10
20
30
40
50
60
70
B0
90
100
110
1 20
1 30
1 40
150
50
160
170
180
190
GOTO
200
2 1 0
220
230
IN"
240
250
260
270
280
290
300
310
320
330
340
REM FAST TYPER
GOSUB :
G0ES=0
SC=0
>o
1 GOSUB 270
READ N
TO INT<RND<1>*N+1>
EVERY 1
RESTORE
FOR L» 1 TO I NT < RMD < 1 ) *N+ 1 ) : READ W*
NEXT L
IF RND(l) >0.001 THEN GOTO 90
INK 12, 26: PEN 12
LOCATE 8, 10:P=1
T=0
PRINT W*
T=T+ 1 : I F I NKEY*< > " " THEN
T=T+1:A*=INKEY*: IF A*=""
GOTO
THEN
140
GOTO 1
140
IF A*OMID*(W*,P,i) THEN GOTO
P=P+1:IF P<>6 THEN GOTO 140
LOCATE 8, 10s PRINT" "5
SC=SC+T:G0ES=G0ES+1:IF G0ESO5 THEN
60
SC=INT(SC/5)
CLS:LL=REMAIN<1>
LOCATE 5, 10: PRINT "AVERAGE TIME : " ; SC
LOCATE 3, 15: PRINT "(SPACE > TO TRY AG A
THEN GOTO ;
• THEN GOTO
:40
250
IF INKEY$="
IF INKEY*<>
RUN
REM LIME SLIDING
REM USING 10 COLOURS
DI
ZZ=LL:LL=LL+1: IF LL>10 THEN LL=1
INK LL, 14: INK ZZ,0
EI .-RETURN
REM PLOT LINES
MODE 0
81
350 FOR L-l TO 10: INK L,L*2:NEXT L
360 CC=1
370 FOR H=l TO 639 STEP 4
380 PLOT H, 1,00: DRAW H, 399, CO
390 CC=CC+1:IF CO 10 THEN 00=1
400 NEXT H
410 BORDER 4
420 FOR LL=10 TO 1 STEP -1:INK LL,0:NEXT
LL
430 RETURN
440 DATA 8
450 DATA MOUSE, HOUSE, WHICH, WITCH
460 DATA MAINS, PLAIN, PLANE, MICRO
CUBIST CONUNDRUMS
Well, to tell the truth, we had to look it up to see what it was
about and it seems there was a Dutch painter named
Mondrian who painted abstract art. What has that to do with
your Amstrad you may ask.
Well, the fact is that your modest little computer has the talent
to originate for your eyes only - abstract art. If you have had
a hard day at the office, in the kitchen or at school just enter
this short program into your computer - sit back and watch
the results.
It really is the most beautifully relaxing experience.
Programming hints
This small but very attractive program can be loaded into the
middle of one of your own programs where you are using a
pause during a search in an adventure. You could also use this
when a large program was loading a second part to memory.
83
The program
10
20
30
40
50
60
70
80
90
1 OC
HC
1 20
13C
14C
CONUNDRUMS
REM CUBIST-
MODE 0
BORDER 3
PAPER INT(RND<1)*16)
A=INT(RND<1)*20+1>
B=INT (RND < 1 > * (21-A) +A)
C=INT(RND<1)*25+1>
D=INT(RND(1)*(26-C)+C>
WINDOW A,B,C,D
J CLS
IF INKEY<47)=0 THEM GOTO 110
IF RND(1)<0.05 THEN GOTO 40
INK INT(RND<1)*16) , INT (RND ( 1 ) #25)
GOTO 40
WIPEOFF
I am afraid that a bunch of horrible vandals have got into your
Amstrad and covered the screen with paint from an aerosol.
You have been stuck with the job of cleaning up the mess
before the law arrive and start to look for a likely suspect.
How to play
You have only 30 seconds to wipe off the mess using the
arrow keys and if you fail to finish in time you will get a
percentage score against your efforts.
Programming hints
If you are too quick at finishing the clean up operation and you
would like even less time to complete then alter the Count 10
00 in line 50.
85
The program
10
20
30
40
50
60
70
SO
90
100
110
120
1 30
140
150
1 60
80
170
1 80
1 90
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
REM WIPEOFF
GOSUB 410
GOSUB 260
SCDRE=0
C0UMT=1000
X=10: Y=10
SOUND 1,500, 10,4
LOCATE X,Y: PRINT" "5
IF INKEY<8)=0 AND X>1 THEN X = X-1
IF INKEY(1)=0 AND X<20 THEN X=X+1
IF INKEY(0)=0 AND Y>1 THEN Y=Y-1
IF INKEY<2)=0 AND Y<25 THEN Y=Y+1
GOSUB 550
IF DD<>32 THEN SC0RE=SC0RE+1
C0UNT=C0UNT-1
IF COUNTOO AND NUMOSCORE THEM GOTO
MODE 2
LOCATE 1', 10
PR I NT "You have cleared " ;
: SPACE >
" THEN
PRINT USING
PRINT" 7. o-f
LOCATE 1, 15
PR I NT "PRESS
IF INKEY*<>
GOTO 30
REM SPRAY AEROSOL.
MODE 0
NUM=~-1
X=10: Y=10
PEN 11
GOSUB 550
IF DD=32 THEN NUM=NUM+1
LOCATE X,Y
PRINT CHR*(143);
IF RND(l) >0.6 THEN
RND(l) >0.6 THEN
RND(1)>0.6 THEN
RND(l) >0.6 THEN
" ### . ## " ; SCORE* 1 OO/NUM ;
the mess"
TO TRY AGAIN'
GOTO 240
IF
IF
IF
IF
X = X + 1
X=X-1
Y=Y+1
Y=Y-1
X >0
N GOTO 310
400 RETURN
AND X<21 AND Y>0 AND Y<26 THE
86
410 REM PUT MACHINE CODE IN MEMORY ABOVE
RE-ADJUSTED HI MEM
420 MEMORY FRE (0) ~?.;80
430 MC=HIMEM+1
440 TA==HIMEM + ?.:7F
450 TH=INT(TA/256)
460 TL=TA-256*TH
470 POKE MC., 2.-CD
480 POKE MC+ 1 , S<60
490 POKE MC+2,2/.BB
500 POKE MC+3,8<32
510 POKE MC+4,TL
520 POKE MC+5, TH
530 POKE MC+6,8«C9
540 RETURN
550 LOCATE X,Y
560 CALL MC
570 DD=PEEK(TA)
580 RETURN
FIRST ONE
wWv Jin1
li
^''rmr^
IIV-^ *i 1 "^L "3CS^3t ilkr^
r ^TF
II If xl "- i v^LE
l^^-"" 'V^^>»^ v ^^"^IP Iw
~'K*Y
A^5 \ \ \
WShs^~
y/HA a
w- <C j ^^j^W^\
This game could mean the possible destruction of your
computer unless you trust all your friends to be gentle.
The game is for up to NINE players, and the object is to be the
first one to press a key and stop the game.
A coloured square will appear on the screen, and then
everyone must try to be first to react.
How to play
The computer will ask "How many players are there?"
Tell the computer, which will then ask for the player's names.
Player One uses key A, player Two uses key B and so on.
If you cheat and move early however, the computer will tell
everyone "Guess who cheated" "It was "
88
The winner will be identified and their reaction time will be
shown.
The program
10 REM FIRST ONE
20 MODE 2
30 BORDER 4
40 I NPUT " How many players are there " ; N
50 IF N<1 OR N>9 THEN PRINT: PRINT" I ' m af
raid that you can only have -from 1 to 9
players" sPRINT: PRINT: GOTO 40
60 DIM n*(N):F0R L=l TO N
70 PR I NT "Name of player "51;" : "5: INPUT
n*<l)
80 IF n*(l)="" THEN GOTO 70
90 NEXT 1
100 MODE 0
110 IF RND(l) >0„997 THEN GOTO 210
120 k$=INKEY*>: IF K*="" THEN GOTO 110
130 FOR L=50 TO 600 STEP 5
140 SOUND 1,L,5:NEXT L
150 S=ASC(K*>-ASC("@"> : IF S< 1 OR S>N THE
N PRINT" ILLEGAL KEY": FOR L=l TO 2000: NEX
T L:GOTO 100
160 MODE 2
170 LOCATE 1,8
180 PR I NT "HEY EVERYONE... GUESS WHO JUST
CHEATED "
190 PRINT" It was "Sn*<S>
200 FOR L=l TO 2000: NEXT L:GOTO 100
210 REM MAKE BLOCK APPEAR
220 LOCATE 6„ 10: PRINT"PRESS NOW"
230 C=0
240 f>C+i:K*=INKEY*:IF K*="" THEN GOTO 2
40
250 S=ASC(K*)-ASC<"@" >
260 IF S<1 OR S>N THEN GOTO 150
270 MODE 2
280 LOCATE 1, 10
290 PRINT N*(S);" wins"
300 LOCATE 1, 15
89
310 PRINT "With a reaction count o-f s "5
C
320 FOR 0=1 TO 4000s NEXT Q
330 GOTO 100
WEIGHTLIFTER
Well here at last is your chance to prove that you should have
been selected for the last Olympics - as a weightlifter?
Your friends will probably tell you that you haven't got the
strength to liftyourself from yourchairbutnowyou can prove
them wrong as you snatch, press and lift with the best of
them.
On the screen you will see a man, his weights and speed tester
- see how you do on your own.
How to play
Just like the real thing the lift must be completed in four
different moves and each one must be properly executed or a
foul sign will appear and you will have to begin again.
91
At the beginning of each movement a small star will move
swiftly across the screen from left to right and you must stop
it between two points to begin the lift.
To stop the star press the SPACE bar.
Another little problem is that the better you become at lifting
the weights the faster the star will move until - we believe -
you won't be able to help your alter ego win a medal but we
could be wrong.
The program
10 REM WEIGHTLIFTER
20 GOSUB 2000
30 SC=Os WEIGHT- 100
40 F=20
100 MODE 1;N=1
1 1 0 GOSUB 3000
120 GOSUB 1000
130 LOCATE 1,20: PR I NT "SCORE : " s SC
1 40 LOCATE 20 , 4 : PR INT" NOW L I FT I NG : " 5 WF I
GUT
145 IF INKEY*<>"" THEN GOTO 500
150 IF RND>0.008 THEN GOTO 150
160 0=0
170 GNQ+1: LOCATE Q, 14
180 PRINT"*" ii
185 FOR T=l TO F:NEXT T
190 IF INKEY*<>"" THEN GOTO 400
200 IF GK40 THEN GOTO 170
210 GOTO 500
400 IF Q<15 OR Q>22 THEN GOTO 500
410 IF N<4 THEN N=N+1 : SC=SC+WEIGHT*N/10:
LOCATE 1, 14 sPRINT"
";:GOTO 110
420 LOCATE 25, 6: PRINT"LIFTED !!!"
430 FOR B=l TO 26
440 SOUND 1,B*20, 10: BORDER BrNEXT B
450 WEIGHT=WEIGHT+10
460 IF F>1 THEN F=F-1
470 GOTO 100
92
500 REM FOUL LIFT
510 LOCATE 25, 6s PR I NT "FOUL"
520 FOR W=»l TO 200: NEXT W
530 LOCATE 1 , 23: PRINT" YOU MADE IT TO " ; W
EIGHT;" POUNDS"
540 IF INKEY*=" " THEN GOTO 540
550 IF INKEY*<>" " THEN GOTO 550
560 RUM
900 REM CLEAR WINDOW
910 WINDOW 1, 10, 1, 10
920 CLS
930 WINDOW 1,40, 1,25
990 RETURN
1000 REM DRAW LIFTER IN POSITION (N)
1010 GOSUB 900
1020 ON N GOTO 1 100, 1200, 1300,, 1400
1 1 00 PLOT 64 , 379 : DRAW 64 , 349 : DRAW 94 , 349
:DRAW 94, 379: DRAW 64,379
1110 PLOT 79, 349: DRAW 79, 300: DRAW 39,240
:PLOT 79, 300: DRAW 119,240
1120 PLOT 39, 312: DRAW 39, 320: DRAW 79,335
:DRAW 119, 320: DRAW 119,312
1130 PLOT 16, 265: DRAW 142,265
1140 PLOT 17, 240: DRAW 17, 290: PLOT 18,240
:DRAW 18, 290: PLOT 19, 240: DRAW 19,290
1150 PLOT 139, 240: DRAW 139, 290: PLOT 140,
240: DRAW 140, 290: PLOT 14 1,240: DRAW 141,2
90
1199 RETURN
1 200 PLOT 64 , 364 : DRAW 64 , 334 : DRAW 94 , 334
:DRAW 94, 364: DRAW 64,364
1210 PLOT 79, 334: DRAW 79,290
1220 PLOT 39, 240: DRAW 64, 290: DRAW 94,290
:DRAW 119,240
1 230 PLOT ' 39 , 265 : DRAW 39,273: DRAW 79 , 320
:DRAW 119, 273: DRAW 119,265
1240 PLOT 16, 265: DRAW 142,265
1250 PLOT 17, 240: DRAW 17, 290: PLOT 18,240
:DRAW 18, 290: PLOT 19, 240: DRAW 19,290
1260 PLOT 139, 240: DRAW 139, 290: PLOT 140,
240: DRAW 140, 290: PLOT 141, 240: DRAW 141,2
90
1299 RETURN
1300 PLOT 64, 379: DRAW 64, 349: DRAW 94,349
:DRAW 94, 379: DRAW 64,379
93
39,240
60,312
335: DR
341: DRAW 142,341
316: DRAW 17, 367: PLOT 18,316
PLOT 19, 316: DRAW 19,367
316: DRAW 139, 367: PLOT 140,
67: PLOT 141, 316: DRAW 141,3
1310 PLOT 79, 349: DRAW 79, 300: DRAW
:PLOT 79, 300: DRAW 119,240
1 320 PLOT 52,341: DRAW ' 52 , 335 : DRAW
:DRAW 79, 335: DRAW 98, 312: DRAW 106
AW 106,341
1330 PLOT 16
1340 PLOT 17
."DRAW 18,367
1350 PLOT 139
3 16: DRAW 140,
67
1399 RETURN
1400 PLOT 64
:DRAW 94,379
14.10 PLOT 79
:PLQT 79,300
1420 PLOT 52, 379: DRAW
:DRAW 106,379
1430 PLOT 17, 399: DRAW 17, 367: DRAW 18
:DRAW 18, 399: DRAW 19, 399: DRAW 19,367
1440 PLOT 139, 399: DRAW 139, 367: DRAW
379: DRAW 64,349:
DRAW 64,379
DRAW 94,349
349: DRAW
DRAW 119.
79, 300:
240
64,335:
DRAW 39
DRAW 94,335
367
240
140.
567: DRAW 140, 399: DRAW 14 1,399: DRAW 141,
67
1 450
1499
2000
20 1 0
2020
2030
2040
ry to
lift wei ghts. "
2050 PRIMT:PRINT"Un-fortunatel
ng isn't all it
ed to tel 1 him
e next stage
of the lif t. "
2060 PRINT: PRINT
es across the
PLOT 16, 379: DRAW 142,379
RETURN
REM INSTRUCTIONS SUBROUTINE
MODE 1
LOCATE 10,1: PR I NT " WE I GHTL I FTER "
LOCATE 9 , 2 : PR I NT " ====-=========:== »
LOCATE 1,5: PR I NT "In this game you t
help Feeble Fredas he attempts to
could be, and so
when he mus'
his t i m i
you ne
move to th
As the timing light fli
sceen, you must shout a
while it is between the-:
t Fred to lift
two critica
1 points. "
2070 LOCATE 13, 20: PR INT" < SPACE >"
2080 IF INKEY*=" " THEN GOTO 2080
2090 IF INKEY*<>" " THEN GOTO 2090
2099 RETURN
94
3000
REM mark critical points
3010
INK 2, 11
3020
PEN 2
3030
PLOT 1 , 1 92 : DRAW 639 ,, 1 92 : PLOT
DRAW
639 , 174
3040
LOCATE 15,13s PR I NT CHR* (214)
3050
LOCATE .22, 13s PRINT CHR* (215)
3060
LOCATE 15, 15: PRINT CHR*(213)
3070
LOCATE 22,15:PRINT CHR*<212)
3090
INK 1,24s PEN 1 s BORDER 5
3099
RETURN
174
KALEIDOSCOPE
^
N
M
t
y
I
u
7
<
t
Y
f
\
/
■n^
— i
<-\
F
J
1
\
r
1
r
,
}
-
—
--
/\
^
\ i
i
St
1
\k
A
f
_y
Once upon a time, before the advent of sophisticated
computers, we used to have little cardboard tubes with glass
panels and pieces of coloured card inside. We used to shake
them and peer into a little hole in the end and see a wonderful
collection of shapes, colours and sizes all in lovely symmetry.
Well, enough of all this nostalgia. This is the age of the
computer so here is an up to date version of an old Victorian
parlour toy. We have included this program because it can be
typed in by the youngest member of the family in ten minutes
and they will then have the immense satisfaction of having
'entered' and 'run' their own computer program with
beautifully colourful results.
Programming hint
This is a handy little program for entering into a main
program as a colourful sub-routine. Simply enter a loop sub-
routine and insert this listing.
96
The program
10 REM KALEIDESCOPE
20 K*=CHR*(207)
30 DEFINT A--Z
40 MODE 0
50 FOR L=0 TO 15
60 INK L,L
70 NEXT L
90 BORDER 5:: LOCATE 1,25: PAPER 5: PR I NT"
II n
n
90 PAPER INT (RND (1)* 16)
100 PEN INT(RND(1>#16>
110 GOSUB 150
120 INK RND(1)*9+6,RND(1)*25
130 GOTO 90
150 REM PLOT KALE ID POINTS
1 60 X= I NT ( RND ( 1 > *20+ 1 ) : Y= I NT ( RND ( 1 ) *24+ 1
)
170 LOCATE X,Y: PRINT K*
ISO LOCATE 21~X,Y: PRINT K*
190 LOCATE 21-X,25-Y: PRINT K*
200 LOCATE X , 25-Y: PRINT K*
210 RETURN
ZOMBIE MAZE
Fingers at the ready!
Eyeballs glued to the screen!
Nerves stretched to the limit!
You are off and running through the maze as FOUR monsters
converge on you for an inevitable end.
Stay alive as long as you can it's more fun that way.
How to play
Use the arrow keys to move your hunted little man around the
maze for as long as you can. You have two moves to the
monster's one - but there are four of them.
98
Programming hints
You might like to know that the tune being played behind your
little man begins at line 790. If you are musical you could
change it to the funeral march.
If you want to change the shape of the maze after a few games
then alter the data in line 980 onwards. The 1 forms the walls
and the 0 the gaps. Remember you must always have 20
characters on each line otherwise the maze will not be
formed. You can have lots of gaps by using 0 but remember
that this means the monsters can move faster as well as you.
The program
10 REM ZOMBIE MAZE
20 DEFINT A-Z
30 SC=0:HS=0
40 MODE 0
50 DEF FNSCR(X,Y)=TEST(32*X-20,408-16*Y)
60 ENV 1,1,120,7,24,-5,14
70 X=2:Y=2sPC=249
80 k*=""
90 M0254
1 00 A ( 1 ) = 1 9 : B < 1 ) =2 : A ( 2 ) =2 : B ( 2 ) =23
110 A ( 3 ) = 9 : B ( 3 ) = 1 0 : A ( 4 ) = 1 9 r. B ( 4 ) = 2 3
120 NUM=1
130 GOSUB 650
140 SOUND &S1,0
150 SOUND &82,0
160 ON SQ(1) GOSUB 790
170 EVERY 10,0 GOSUB 410
180 EVERY 9,1 GOSUB 520
190 FLAG=0
200 REM MAIM LOOP
210 SC=SC+1:IF SOHS THEN HS=SC
220 DI
230 LOCATE 1,25
240 PEN 8
250 PRINT "SCORE : " ;
260 PRINT USING "######" ;SC;
99
270
230
290
300
310
320
330
340
NEX
350
360
370
380
390
400
410
420
430
440
450
460
470
480
E X
490
EI
IF FLAG=0 THEM GOTO 200
SOUND &C1,0
SOUND &C2,0
DI
Z-REMA I N ( 0 ) : Z =REMA I N ( 1 )
LOCATE 7, 10:PEN 7: PR I NT "GAME END"
FOR Z=l TO 400: INK 7, INT <RND ( 1 > #24)
T Z : I NK 7,13
FOR Z=l TO 300: NEXT
IF SC=HS THEN GOSUB
A*=INKEY*: IF A*>=" "
A*=INKEY*: IF A*<>" '
EI
SC=0:GOTO 40
REM PLAYER ROUTINE
IF INKEY(28)=0 THEN
IMKEY(63)=0
INKEY(30)=0
INKEY(71)=0
Z
860
THEN GOTO 370
' THEN GOTO 380
THEN
THEN
THEN
CY=-1
CX = 1
CY=1
CX=-1
IF
IF
IF
DI
TX=X+CX:TY-Y+CY:CX=0:CY=0
COL=FNSCR<TX.,TY) : IF C0L=5 THEN LOCAT
Y: PRINT" "; : X=TX: Y=TY:GOTO 490
PC=497~-PC : LOCATE X , Y : PR I NT CHR* ( PC ) ;
500
5 1 0
520
530
-MC
540
550
560
570
EI
RETURN
REM MONSTER ROUTINE
NUM=NUM+1:IF NUM=5 THEN
NUM=1:MC=509
TRY=0
CA=SGN<X-A(NUM> ) : CB=SGN ( Y-B (NUM) )
TA=A (NUM) +CA: TB=B (NUM) +CB
COL=FNSCR(TA,TB> : IF C0L=5 THEN LOCAT
E A (NUM) ,B (NUM) : PRINT" " ; : A (MUM) =TA: B (NU
M)=TB:GOTO 620
580 IF C0L=3 THEN FLAG=-1 : RETURN
590 TRY=TRY+1:IF TRY=3 THEN GOTO 620
600 CA=SGN ( I NT ( RND*3 ) - 1 ) : CB=SGN ( I NT ( RND*
3)-l)
610 GOTO 560
620
MC=509-MC: LOCATE A(NUM),B(NUM
630
DIrPEN 11:PRINT CHR$ (MC) ; : PEN
640
RETURN
650
REM DRAW THE MAZE
100
660 SYMBOL 240 , fcCC , &33 , &CC , &33 , &CC , &33 , 3<
CC&33
670 MODE On PAPER 5: PEN 12
680 BORDER 6
690 RESTORE 990
700 FOR L=l TO 24
710 READ L$
720 FOR M=l TO 20
730 D= V AL ( M I D$ ( L* , M , 1 ) )
740 IF D=l THEN PRINT CHR$(240); ELSE PR
INT " ";
750 NEXT M
760 NEXT L
770 RESTORE
780 RETURN
790 REM PLAY NEXT NOTE OF TUNE
800 READ NOTE
810 IF N0TE==--1 THEM RESTORE: GOTO 800
820 SOUND & 1 1 , NOTE , 50 , 0 , 1 , 0 , 0
830 SOUND 8<A , NOTE*0 ., 69 , 50 ,0,1, 0 , 0
840 ON SQ(1) GOSUB 790
850 RETURN
860 REM GOT HIGH SCORE
870 PEN 8
830 LOCATE 6, 14: PRINT "HIGH SCORE"
890 FOR 2=1 TO 200 STEP 5: INK 8,INT(RND(
1>*24>
900 SOUND S<83, ABS (500--Z*5> , 15
910 NEXT Z
920 RETURN
930 REM TUNE DATA
940 DATA 478,379,319,379
950 DATA 358,284,239,284
960 DATA 319,379,319,358,379,426,478,239
970 DATA --1
980 DATA "11111111111111111111"
990 D A T A " 1 0 0 0 0 0 0 1 0 0 001 0 0 0 0 0 01"
1 000 DATA " 101111 000 1 1 000 111101"
1 0 1 0 DATA " 1 0 1 00 1 0 1 0000 1 0 1 00 1 0 1 "
1 020 DATA "1011 000 1 1 00 1 1 000 1101 "
1 030 DATA " 1 0 1 00 1 00 1 00 1 00 1 00 1 0 1 "
1 040 DATA "101011011 00 1101101 0 1 "
1 050 DATA " 1 0000 1 0 1 0000 1 0 1 0000 1 "
1 060 DAT A " 1 1 0 1 000 101101 000 1011 "
1 070 DATA " 1 00 11111011011111001"
1 080 DATA " 1 00000 1 00 1 1 00 1 00000 1 "
101
1 090 DATA n 1 0 1 1 1 000 1111 000 11101'
1 1 00 DATA " 1 0.0000 1 00 1 1 00 1 00000 1 '
1110 D A T A ' ' 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 !
1 120 DATA" 101 1 101010010101 1 101 '
1 1 3 0 D A T A " 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 !
1 1 40 DATA " 1 1 00 1 1 1 0 1 00 1 0 1 1 1 00 1 1 '
1 1 5 0 D A T A " 1 0 0 0 1 0 1 0 1 0 0 1 0 1 0 1 0 0 0 1 '
1 1 60 DATA" 1 0 111011 1 00 1110111 0 1 !
1170 D A T A " 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 '
1 1 80 DATA " 1101 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 '
1 1 90 DATA " 1 00 1 0 1 0 1011 0 1 0 1 0 1 00 1 !
1200 D A T A ' ' 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 1 '
1 2 1 0 DATA "11111111111111111111 !
PONTOON
It's gamblers corner again as you pit your wits, and money,
against the Amstrad croupier at the old classic game. By the
way you can't cheat when you show your hand as your
computer already knows what you are holding.
The object of the game, in case you have never strayed into a
card school, is to achieve a score of 21 in as few cards as
possible. If you over buy, or over twist, and score more than
21 you are 'bust' and you lose your stake. Aces count a 1 or 1 1
except when you receive two aces in a deal. In this case your
hand will stand as 12.
How to play
The computer will deal your first two cards and ask if you
would like to T (Twist, take another card without increasing
your stake); S (Stay on your existing, or eventual hand); B
(Buy another card); F (Fold if you think your hand is useless,
but remember you will lose your stake money, and give you
another hand).
103
If you buy, or twist, to a five card trick (five cards totalling 21
or less) you will beat the computer, unlesss it had a pontoon
(21).
Press the key corresponding to your choice at each stage.
There is no need to press ENTER at each stage.
When buying a card, type in the amount you wish to bet and
press ENTER.
Remember, if you lose your shirt on this game you won't have
to part with it.
The Program
0
o
0
0
0
0
0
0
0
00
10
20
30
40
50
60
70
SO
90
00
10
REM PONTOON
MODE 2: BORDER 15
V=0
DIM 0(52)
DIM P<10) ,M(2)
GOSUB 760 '
M= 1 00
REM HAND LOOP
CLS
M=M-2:IF M<0 THEN GOTO 700
PRINT" You have ";M;" pounds
BET=2
PR I NT "Your cards : "
GOSUB 900
GOSUB 9S0: PRINT" The "K*
P(1)=V:GDSUB 9S0: GOSUB 900
The ";K*:P(2)=V:G0Sl
left"
900
PR I NT
N=2
IF P(l)=l THEN P(l)=ll
IF P(2>=1 AND P(1X>11 THEN P(2)==ll
IF P(l)+P(2)=21 THEN PRINT: PRINT" Yo
have got a PONTOON ! ! ! "
20 SP=P(1)+P(2)
30 REM PLAYER CHOICES
40 PRINT "Twist / Stick / Buy / Fold ?
250 A*=INKEY$:IF A*<>"" THEN GOTO 250
260 A*=INKEY*:IF A*="" THEN GOTO 260
104
270 IF A*<>"T" AMD A*<>"S" AMD A$<>"B" A
ND A$<>"F" THEN GOTO 250
280 IF A*=:"F" THEN PR I NT "O.K. You lose
your stake" : BOSUB 900: GOTO 90
290 IF A$="S" THEM GOTO 400
300 IF A*="B" THEN GOSUB 930: PR INT" 0. K.
Good luck"
310 N=N+1:REM NEXT CARD
320 GOSUB 900: GOSUB 980
330 PR I NT "The " ; K*
340 P(N)=V:SP=0
350 FOR L=l TO N: SP=SP+P (L> : NEXT L
360 IF SP>21 THEM PRINT"BUST " : GOT
0 400
370 IF N>4 THEM PRINT "FIVE CARD TRICK...
II
380 IF SP=21 THEN PRINT"TWENTY ONE
GOTO 210
REM Now the computer plays
SP=0
FOR L=l TO NsSP=SP+P<L> :NEXT L
PRINT: PR I NT "My cards :"
GOSUB 900
MT=0: GOSUB 980: PRINT" The " ; K*
M(1)=V:G0SUB 900: GOSUB 980
PRINT" The "; K*: GOSUB 900:M<2)=V
IF M(l)=l THEN h1(l)=U
IF M(2>=1 AND M(1X>11 THEN M(2)=ll
IF M(l)+M(2>=21 THEN GOTO 610
IF P<l)+P<2>=21 AND N=2 THEN GOTO 65
390
400
410
420
430
440
450
460
470
480
490
500
510
0
520 MT=M(1)+M<2)
530 IF MT<SP AND
540 IF N<5 THEN PRINT" I
UB 900: GOTO 610
550 PRINT" I will twist...
GOSUB 980: GOSUB 900
PRINT" The " ; K*
MT=MT+V: GOSUB 900
IF MT>21 THEN PRINT" I
GOTO 650
600 GOTO 530
610 REM PLAYER LOSES
620 PR I NT: PR I NT "You lose that hand"
630 GOSUB 900: GOSUB 900
THEN
will
GOTO 550
st i ck
GOS
560
570
580
cr,C
90
am bust,,
105
640
650
660
670
680
690
700
710
720
730
740
750
760
770
780
790
8 00
3 1 0
820
830
840
850
860
870
880
890
900
910
920
930
940
950
ven
960
970
980
990
1000
GOTO 80
REM COMPUTER LOSES
PRINT: PR I NT" You win that, hand"
GOSLJB 900:G0SUB 900
M=M+2*BET
GOTO 80
REM HERE WHEN PLAYER IS BROKE
PRINT: PRINT,,You are broke"
GOSUB 900
PR I NT "Come back on a luckier day"
GOSUB 900
END
REM RANDOMIZE PACK
PR I NT "+++■+-+++ NEW PACK +++++++"
FOR L=l TO 52
C(L)=L:MEXT L
REM SHUFFLE
FOR L=l TO 100
IF V>10 THEN V=10
A=INT(RND(1)*52+1>
B=INT(RND<1)*52+1>
T=C(A) :C(A)=C(B)
C(B)=T
NEXT L
0=1
RETURN
REM A SHORT DELAY
FOR ZZ = 1 TO 700: NEXT ZZ
RETURN
REM INCREASE THE BET BY BUYING
PRINT"BUY -for how much ";
INPUT BB:IF M-BB<0 THEN PRINT"You ha
t got that much money": GOTO 940
BET=BET+BB:M=M--BB
RETURN
REM CARD IN K
REM NAME IN K*
K==C(Q) :Q=Q+1: IF Q=53 THEM GOSUB 760
I NT ( ( K- 1 ) / 1 3 ) : V=K- 1 3*S
1020 ON V GOSUB 1060,1070,1030,1090,1100
, 1110, 1120, 1130, 1140, 1150, 1160, 1170, 1180
1030 ON S+l GOSUB 1190,1200,1210,1220
1040 IF V>10 THEN V=10
RETURN
K*="Ace ": RETURN
k$="Two ": RETURN
k$=" Three ": RETURN
1 050
1 060
1 070
1080
106
1090 k*="Four " : RETURN
1 1 00 k *= "Five " : RETURN
1110 k*="Six ": RETURN
1120 k$=" Seven ": RETURN
1130 k*=" Eight ": RETURN
1140 k$="Nine ".-RETURN
1150 k*-"Ten ": RETURN
1160 k$="Jack ": RETURN
1 1 70 k *= " Queen " : RETURN
1180 k*="King "."RETURN
1190 k*=k*+"o-f Clubs": RETURN
1200 k$=k$+"of Diamonds ".-RETURN
1210 k*=k*+"o-f Hearts": RETURN
1220 k*=k$+"of Spades": RETURN
MORSE ENCODER
If you are planning to go sailing in the near future, then this
program will help you brush up your morse code before you
go.
Can you remember what to tap for S.O.S.?
It's ...---...
That's all the help we are going to give you. Hope you don't
have to use it.
When you type a message into this program, your computer
will play it back in morse code. A good way to test each
message is to have someone else enter the message, and for
you to sit down on the other side of the room and see if you
can decode it.
108
How to play
Just press the alphabet keys of your choice.
Programming Hint
If you feel that the play back is too slow, or too fast, you can
change the speed by altering S=12in line 20 of the program.
The program
10 REM MORSE ENCODER
20 S=12:D=4
30 DIM M$(26)
40 FOR L=l TO 26: READ M*(L)
50 NEXT L
60 MODE 1
70 BORDER 13
80 LOCATE 1,6
90 PRINT "Message to transmit :"
100 LINE INPUT "",1*
110 FOR L=l TO LEN<I$)
120 CH*=MID*(I*,L, 1)
130 IF CH*>="a" AND CH*<="z" THEN CH$=CH
R* (ASC <CH$) -ASC ( "a" ) +ASC ( "A" ) )
140 IF CH$<"A" OR CH$>"Z" THEN GOSUB 210
:GOTO 160
150 GOSUB 350
160 NEXT L
170 LOCATE 1,20 : PR I NT "Transmission compl
ete"
FOR L=l TO 2000: NEXT L
CALL &BB06
RUN
REM PAUSE BETWEEN WORDS
FOR W=l TO 120*D:NEXT W
RETURN
180
190
200
210
220
230
240
250
260
270
REM SHORT PAUSE
FOR W=l
RETURN
REM DOT
TO 30*D:NEXT W
109
280
290
300
310
320
330
340
350
360
370
380
390
0T0
400
410
420
430
440
450
460
SOUND 1, 1 30, 3*DS SOUND 1,0,D
GOSUB 240 '
RETURN
REM DASH
SOUND 1 , 1.30, 9*D: SOUND 1 , O, D
GOSUB 240 ' "
RETURN
REM SOUND ONE CHAR
X=ASC ( CH$ ) -ASC ( " A " ) + I
F$=M$(X)
FOR M=l TO LEN(F$)
IFM1ID*(F*,M,1>«»S" THEN GOSUB 270:6
GOSUB 310
NEXT M
RETURN
DATA SL,LSSS,LLS,LSS,S,SSLS,LLS
DATA SSSS,SS,SLLL,LSL,SLSS,LL
DATA LS , LLL , SLLS , LLSL , SLS , SSS , L
DATA SSL , SSSL , SLL , LSSL , LSLL , LLSS
SAFECRACKER
Here is your chance to see if you could be of any use to
Smiley's People as an inside man.
We have set up a series of numeric codes for you to 'crack' in
order to open the safe.
Digits range from 1 to 8 inclusive.
How to play
Your computer will select, at random, it's own sequence and
ask for your first choice of four numbers.
Enter your numbers and press ENTER.
After your first 'guess' your Amstrad CPC will put up it's
'mark' to show you how many of your numbers are correct,
and how many are in the right place.
111
You will not be told which of your numbers is in the correct
place, only that one, or more, is in the correct place. You will
still have to decide for your next move which of your first
selection is correct.
We told you it was a test for Smiley's People didn't we.
The Program
THEN GOTO 190
10 REM SAFECRACKER
20 DIM C(4),G(4),T(4)
30 GOSUB 270
40 MODE 1: BORDER 8
50 G=0:F=0
60 PEN 1
70 GOSUB 360
80 G=G+l : if g=1 1
90 GOSUB 390
100 GOSUB 550
110 IF F=0 THEN GOTO 80
120 REM CORRECT DEDUCTION
130 LOCATE 1,19: PRINT "CORRECT
fe swings gently open"
140 FOR L=l TO 4
150 PRINT C(L) 5 "
160 NEXT L
170 LOCATE 9, 21: PRINT "IN ";Gs
The Sa
attempts
180
190
200
ut
GOTO 240
REM THE COMBINATION REMAINED HIDDEN
LOCATE l,14:PRINT"Alarm bells ring o
loudly": LOCATE 1 , 16: PRINT"The time sw
h Hoc: H«*-%ri A.^.-* it.
itch has been triggered
210 LOCATE l,19:PRINT"The combination wa
220 LOCATE 1,21 : PRINT" »■
230 FOR L=l TO 4.-PRINT C(L);" "i
240 IF INKEY*-" " THEN GOTO ' 240
250 IF INKEY*<>" " THEN GOTO 250
260 RUN
270 REM SET THE COMBINATION LOCK
280 C(1)=INT(RND(1)*8+1)
NEXT L
112
290 FOR L=2 TO 4
300 C < L ) = I NT ( RND ( 1 ) *8+ 1 )
310 FOR 1 = 1 TO L--1
320 IF C(L)=C(I) THEN C (L) =INT (RND ( 1 ) *8+
1)
330 NEXT I
340 NEXT L
350 RETURN
360 REM TITLE THE COLUMNS
370 LOCATE 4, 1 : PRINT" YOUR GUESS my mark
330 RETURN
390 REM GET A GUESS INTO GO
400 L=l
410 IF INKEY*<>"" THEN GOTO 410
420 D*=INKEY*:IF D$="" THEN GOTO 420
430 D=ASC(D$)
440 IF D=127 THEN GOTO 500
450 IF D=13 THEN GOTO 530
460 IF D<ASC("1") OR D>ASC("9") THEN GOT
0 410
470 IF L=5 THEN GOTO 410
480 LOCATE 3+L*2, G+3: PEN 2: PRINT CHR*(D>
490 G(L>=D-48:L=L+1:G0T0 410
500 L=L--1:IF L=0 THEN L=l
510 LOCATE 3+L*2,G+3: PRINT " "5
520 GOTO 410
530 IF L<5 THEN GOTO 410
540 RETURN
550 REM SCORE GO AGAINST THE COMB I NAT 10
N
560 B1=0:W1=0
570 FOR H=l TO 4
580 IF G(H)=C(H) THEN B1=B1+1
590 NEXT H
600 FOR L=l TO 4: T (L) =C (L) : NEXT L
610 FOR J=l TO 4
620 IF T<J>=-1 THEN GOTO 660
630 FOR L=l TO 4
640 IF T(J)=G(L) THEN W1=W1+1 : T < J) =-1
650 NEXT L
660 NEXT J
670 W1=W1-B1
680 IF Bl=4 THEN F=l
113
690 LOCATE 15,3+G
700 PEN 3
710 PRINT BIS " ";W1
720 RETURN
BIORYTHM GRAPHING
AND PREDICTION
Don't worry it isn't going to hurt you, just lie back and enjoy
the sensation of your life flashing past you.
In simple terms this is a system which will allow you to predict
the type of day you are going to have, or check and see if the
day just passed, is as bad as you think possible.
You type in the data and your Amstrad CPC will tell you, and
show you the shape of the day to come. It will also give you an
idea of the days on both sides of the day in question.
Imagine the potential in drawing up friend's charts and
sending them as Christmas or birthday presents.
How to play
The Amstrad CPC will ask you to enter your birth date and the
date of the day on which you are using the program.
115
You will then be asked forthe year, month and day/date of the
week you wish to predict. When you are asked for the day
remember to enter the day/date not just any day as there are,
of course, several Tuesdays in a month.
Press ENTER key after each entry.
After you key in the final information the computer will
produce a chart of your physical, emotional and intellectual
state on the day in question. As we said before, you will also
see a picture of the days on either side and you may then
decide not to leave your bed for the next week.
To clear, type RUN and return to the menu.
The Program
10 REM BIQRHYTHM GRAPHING AND PREDICTION
20 MODE 1: BORDER 2
30 LOCATE 1,5: PRINT" BIRTHDATE ENTRY :"
40 GOSUB 290
50 BY=Y:BM=M:BD=D
60 CLS: LOCATE 1 , 5: PRINT" DATE TO INVEST I G
ATE ENTRY : "
70 GOSUB 290
GO GOSUB 430
90 EM=DAYS~2S* I NT (DAYS/28)
I T=DA YS-33* I NT ( DAYS/ 33 )
PH=DAYS-23*INT (DAYS/23)
CLS: PEN 1: LOCATE 6, 1
PR I NT "PHYSICAL. CYCLE"
0=PH/23*360: MU=28/23
C=l: GOSUB 550
LOCATE 6, 2: PEN 2:C=2
PR I NT "EMOTIONAL CYCLE"
0=EM/28*360:MU=1
GOSUB 550
LOCATE 6, 3: PEN 3:C=3
PRINT" INTELLECTUAL CYCLE"
0=IT/33*360: MU=28/33
1 Of
11C
12C
13(
140
15C
16C
17C
1 80
19C
20C
21C
23C
24C
GOSUB 550
PLOT 384, 10: DRAW 384,250
116
250
260
270
280
290
300
FEN 1
IF INKEY*<>"" THEN GOTO 260
IF INKEY*="" THEN GOTO 270
RUN
REM READ IN A DATE
LOCATE 1, 11: PR I NT "YEAR
": LOCATE 10,11
310 INPUT Y:IF YOINT(Y) THEN GOTO 300
320 LOCATE 1 , 1 6 : PR I NT " MONTH ....
": LOCATE 10, 16
330 INPUT M*
340 I F LEFT* ( M* , 1 > > " 0 " AND LEFT* ( M* , 1 ) < =
"9" THEN M=VAL(M*> : GOTO 390
350 RESTORE 640
360 M=0:FOR L=l TO 12
370 READ T*:IF T*=LEFT* (M*, 3) THEN M=L
380 NEXT L
390 IF M=0 OR MOINT(M) OR M>12 THEN GOT
0 320
400 LOCATE 1 , 21 : PR I NT "DAY
": LOCATE 10,21
410 INPUT D:IF D< 1 OR D>31 OR DOINT(D)
THEN GOTO 400
420 RETURN
430 REM FIND THE NUMBER OF DAYS
440 DP=0:DM=0
450 DP=365 . 25* Y : DM=365 . 25*BY
460 RESTORE 680
470 FOR L=l TO 12
480 READ T
490 IF M=L THEN DF-DP+T
500 IF BM=L THEN DM=DM+T
510 NEXT L
520 DP=DP+D:DM=DM+BD
530 DAYS=DP-DM
540 RETURN
550 RLM DRAW A CYCLE
560 Y=70+60*SIN( (-360*MU+0) *PI/ 180)
570 X=48
580 FOR TH--360 TO 350 STEP 2.5
590 0X=X:X=TH/4. 5+128: OY=Y
600 Y=70+60*SIN( (TH#MU+0) *PI/180)
610 PLOT 3#0X,2#0Y,C:DRAW 3*X,2*Y:NEXT T
H
620 FOR L=l TO 3000: NEXT L
630 RETURN
117
640
DATA
J AIM, FEB
, MAR
650
DATA
APR, MAY
, J UN
660
DATA
JUL, AUG
, SEP
670
DATA
OCT, NOV
, DEC
680
DATA
0,31,59
,90, 120, 151
273,
304,.:
534
181,212,243,
DICE
If you are bored with shooting down missiles and defending
the world from alien attack then here is a game to test your
gambling skill.
The Amstrad CPC will 'throw' five dice for you and you must
try to achieve the best sequence possible for the greatest
score.
Possibilities to achieve highest scores are:
One pair
Three of a kind
Two pair
Full house (Three of a kind and two of a kind)
Four of a kind
Low run
High run
Five of a kind
119
How to play
After the computer's first 'throw' you can hold the dice by
using keys 1 to 5. Press R to release all the dice. Use SPACE to
roll the dice free. You have ten rolls to make your high score
and give your partner a target to beat.
The Program
10
20
30
40
50
60
70
80
90
1 00
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
REM DICE
MODE 1: BORDER 12
DIM D<5) ,F(5) ,S(6)
T=10
SC=0
GOSUB 1110
PEN 1
T=T-1:IF T=0 THEN GOTO 490
FOR L=l TO 5:F(L)=0:NEXT L
LOCATE
LOCATE
LOCATE
LOCATE
1,7s PRINT"
ll
1, UrPRINT"
II
1, 15: PRINT"
II
1,20: PRINT"
220
350
220
350
220
620
GOSUB
GOSUB
GOSUB
GOSUB
GOSUB
GOSUB
SC=SC+NS
GOTO 80
REM GENERATE AND SHOW FIVE DICE
FOR L=l TO 5
IF F(L)=1 THEN GOTO 330
Q=INT(RND( 10*60+10)
D(L)=1
FOR E=l TO Q
LOCATE L*3+4,5
D(L)=D(L)+1
120
300 IF D(L)=7 THEN D(L)=1
310 PRINT CHR$(128+D(L) ) 5
320 NEXT E
330 NEXT L
340 RETURN
350 REM SET THE STOP FLAGS
360 LOCATE 8, 2: PR I NT "HOLD NOW
370 LOCATE 1,7: PRINT"
380 FOR L=l TO 5: F (L> =0: NEXT L
390 A*=INKEY*: IF A$<>"" THEN GOTO 390
400 A*=INKEY*:IF A*="" THEN GOTO 400
410 IF A*=" " THEN GOTO 460
420 IF A*="R" THEN GOTO
430 IF AS<"1" OR A*>"5"
440 A=ASC ( A* ) -48 : LOCATE
450 F(A)=1:G0T0 400
460 REM FINISHED
470 LOCATE 8, 2: PRINT"
370
THEN GOTO 390
3*A+4,7:PRINT'
480 RETURN
490 REM END OF GAME
500 MODE Is PEN 3
510 LOCATE 1,11
520 PRINT"End of the Game"
530 LOCATE 1, 14
540 PRINT"Your score is :"
550 LOCATE 9, 17
560 PRINT SC
570 LOCATE 6,23
580 PR I NT "Press < SPACED
590 a$=INKEYS: IF A*=" "
600 A*=INKEY*: IF A*<>"
610 RUN
620 REM SCORE THE DICE
630 REM RETURN SCORE IN NS
640 FOR L=l TO 6: S <L) =0s NEXT
650 FOR L=l TO 5
660 S<D<L> )=S(D(L) )+l
670 NEXT L
680 Z 2=0: FOR L=l TO 6
690 IF S(L)=1 THEN Z2=Z2+1
700 NEXT L
710 Z 1=0: FOR L=l TO 6
720 IF S(L)=0 THEN Z1=Z1+1
730 NEXT L
to continue"
THEN GOTO 590
THEN GOTO 600
121
THEN GOSUB 930: GOTO 840
AND S(6)=0 THEN GOSUB 1050;:G
1090s GOTO 840
1030: GOTO 840
740 IF Zl=5
750 IF Zl=l
OTO 840
760 IF Zl = l AND S ( 1 ) =0 THEN GOSUB 1
OTO 840
770 IF Zl=l THEM GOSUB
780 IF Zl=2 THEN GOSUB
790 IF Zl<>3 THEN GOTO 820
800 IF Z2=l THEN GOSUB 970: GOTO 840
BIO IF Z2=2 THEN GOSUB 1010: GOTO 840
820 IF Z2=l THEN GOSUB 990: GOTO 840
830 GOSUB 950
840 REM SCORE IS NOW IN NS
850 REM AND MESSAGE IS IN N*
860 LOCATE 1,11:PRINT"
II
870 LOCATE 1,11: PRINT N$
880 LOCATE 9, 15: PRINT"SCORE :";NS;"
70: G
890 LOCATE 16, 20: PR INT" < SPACE >"
900 IF INKEY*=" " THEN GOTO 900
910 IF II\IKEY*<>" " THEN GOTO 910
920 RETURN
930 REM FIVE OF A KIND
940 N*= "********#* EUREKA ##****#***" : MS
=50: RETURN
950 REM PAIR AND THREE
960 N$= "******** FULL HOUSE *********'•• M
S=30: RETURN
970 REM TWO PAIRS
980 N*=" ****** DOUBLE DOUBLE ******" :NS=
20: RETURN
990 REM FOUR OF A KIND
1000 N$= "*#*##*#* FOUR TIMES ********": M
S=15: RETURN
1010 REM THREE OF A KIND
1020 N*= "******* THREE TIMES ******* ": MS
=10: RETURN
1030 REM ONE PAIR
1040 N*= "**** MADE FOR EACH OTHER ****":
NS=7: RETURN
1050 REM LOW RUN
1060 N$= "***•##*#** LOW RUN *#*###***" : NS
=24: RETURN
1070 REM HIGH RUN
1080 N$="#*#****** HIGH RUN ***•*#***#" s N
122
S=4<
1090
HOC
S=Os
1 1 1 c:
112(
1 130
1 14C
use
116C
1 1 7C
rr
U
i iac
195
1 19C
M
: RETURN
REM MO SCORE AT ALL
Z$="***#******* ZERO ******#***#"
RETURN
REM DEFINE DICE SHAPES
SYMBOL AFTER 129
SYMBOL 1 29 , 0 , 0 , 0 , 24 , 24 , 0 , 0 , 0
SYMBOL 1 30 , 3,3, 0 ,0,0,0,192,1 92
SYMBOL 131,3,3,0,24,24,0, 192, 192
SYMBOL 132, 195, 195,0,0,0,0, 195, 195
SYMBOL 133, 195,195,0,24,24,0, 195, 19
SYMBOL 134, 195, 195,0, 195, 195,0, 195,
RETURN
HUNT THE DAY
Have you ever wondered if your old dad was 'Fair of Face',
'Full of Grace', 'Full of Woe', had 'Far to Go' or, hopefully, was
'Full of Loving and Giving'?
Now is your chance to find out.
If you ask any members of your family, or your friends, when
they were born you will be able to tell them, using this
program, the actual day of the week when the great event
happened.
By the way, this chart is only effective as far back as 1st
January, 1753 which was when the calendar changed to it's
present form. Of course, you already knew that didn't you?
Oh, by the way, we have taken account of leap years just in
case you thought you could catch us out.
124
How to play
You will be asked for details of the date you have in mind.
When you have typed in the data press ENTER after each item.
When you have completed the requested material your
Amstrad CPC will do the rest for you.
The Program
10 REM HUNT THE DAY
100 MODE 1
110 LOCATE l,4:PRINT"Please give the dat.
e you wish to " : PRINT"investigate. "
120 GOSUB 1000
130 GOSUB 2000
140 LOCATE 1,2
150 PRINT" That was/is/will be a " ; T
160 LOCATE l,21:PRINT"Please press <SPAC
E> when ready"
200 IF INKEY*=" " THEN GOTO 200
210 IF INKEY*<>" " THEN GOTO 210
299 RUN
1000 REM get a date
1010 LOCATE 1, 11:PRINT"YEAR
": LOCATE 10, 11
1020 INPUT y:IF y<1753 OR yOINT(y) THEM
GOTO 1010
1100 LOCATE 1, 14: PR I NT "MONTH .. .
": LOCATE 10, 14
1110 INPUT M*:IF LEFT* <M», 1 ) >=" 1 " AND LE
FT*(M$, 1)<="9" THEN M=VAL (M*) : GOTO 1200
1120 RESTORE 9000
1 125 M=0
1130 FOR L=l TO 12
1140 READ T*
1150 IF T*=LEFT*(M*,3> THEN M=L
1160 NEXT L
1200 IF M<1 OR M>12 OR MOINT(M) THEN GO
TO 1100
125
1 300 LOCATE 1 , 1 7 : PR I NT " DAY
": LOCATE 10, 17
1310 INPUT D
1320 IF D<1 OR D>31 OR DOIMT(D) THEN GO
TO 1300
1999 RETURN
2000 REM FIND OUT DAY OF WEEK
2010 A=Y+1+31*<M-1)+INT( (Y-l > /4) -INT (3*1
NT( <Y+99)/100)/4>
2020 IF M<=2 THEN GOTO 2040
2030 A=Y+1+31*(M-1)-INT( <4*M+23> / 10) +INT
(Y/4)--INT<3*(INT(Y/100)+l)/4>
2040 A=A-INT(A/7>*7
IF A=0 THEN A=7
A=A-1:IF M=2 THEN GOTO 2100
N=31
IF M=4 OR M=6 OR M=9 OR M=ll THEN N
2050
2060
2070
2080
2090
2 1 00
2110
2 1 20
2130
7
2135
2140
2150
2160
2999
9000
GOTO 2120
N=28
IF Y-INT(Y/4)*4=0 THEN N=29
IF D>N THEN T*=" NON-DAY
DOESN'T EXIST ": RETURN
A=A+D:D=A-INT(A/7>#7: IF D=0 THEN D=
RESTORE 9500
FOR L=l TO D
READ T$
NEXT L
RETURN
DATA JAN, FEB, MAR
9010 DATA APR,MAY,JUN
9020 DATA JUL, AUG, SEP
9030 DATA OCT, NOV, DEC
9500 DATA SUNDAY, MONDAY, TUESDAY
9510 DATA WEDNESDAY, THURSDAY, FRIDAY
9520 DATA SATURDAY
WALLBREAKER
This is our version of the popular arcade game of the same
name. Along the top of the screen you will see three rows of
coloured 'bricks' and you must use the bouncing ball to
demolish the wall in as few moves as possible.
A little hint. If you break through the first two rows and get to
the back wall the ball will stay bouncing, and demolishing,
from behind until it breaks out again.
How to play
Use arrow keys to move the bat across the screen.
Programming Hints
If you are finding the game too easy, or too difficult, you can
change the size of the bat by altering Line 80. Increase, or
reduce the number after BL=. If you want to sit back and let
127
the ball bounce on it's own then simply increase the bat size
until it fills the bottom of the screen.
The Program
10 REM
20 ENV 1, 1, 15, 1, 15,-1, 1
30 GOSUB 590
40 HS=0
50 BL=7
60 BA$="":FOR L=l TO BL:BA*=BA*+CHR* < 132
):NEXT L:BA*=" "+BA*+" "
70 BE=31-BL
80 GOSUB 450
90 REM MAIN NEW GAME LOOP
100 SC=0
110 REM MAIN NEW FRAME LOOP
120 BH=90
130 GOSUB 360
140 BX=10: GOSUB 540
150 X=5:Y=20
160 CX=1:CY==-1
170 GF=1
ISO REM MAIN BOUNCE AND SCORE LOOP
190 GOSUB 750
200 IF GF=0 THEM GOTO 1000
210 GOSUB 920
220 GOSUB 960
230 PEN 3
240 LOCATE 8,1: PR I NT SC;
250 IF BHOO THEN GOTO 190
260 REM END OF FRAME
270 FOR L=10 TO 250 STEP 5
280 SOUND 1,L,5:S0UND 2,L+7,4
290 NEXT L
300 MODE 1: LOCATE 4,11
310 PRINT "Your score is now : " j SC
320 IF SOHS THEN PRINT "You have the hig
h score" : PRINT: PRINT"and you're still pi
ayi rig": GOTO 340
330 PRINT" You are "ihs-scj" points behin
d the high score"
340 FOR L=l TO 4000: NEXT L
128
350 GOTO 110
360 REM Draw screen layout
370 MODE 1: BORDER 14: PAPER OnPEN 2
380 FOR L=2 TO 22
390 LOCATE 1 , L : PR I NT CHR* < 129) : LOCATE 32
, L: PRINT CHR* ( 130) S : NEXT L
400 LOCATE 2, 2: FOR L=2 TO 31: PRINT CHR* (
134) 5 :NEXT L
410 FOR L=2 TO 31: PEN 3: LOCATE L, 6s PRINT
CHR* < 133) 5 : LOCATE L, 13: PRINT CHR* (133);
420 PEN 1 : LOCATE L , 9 : PR I NT CHR* < 1 33 ) 5 : ME
XT L
430 LOCATE 2, 1 : PR I NT "SCORE s HIGH
: " ;HS
440 RETURN
450 REM GENERATE THE PATTERNS
460 SYMBOL AFTER 129
470 SYMBOL 129,4,2,1,2,4,2,1,2
480 SYMBOL 130,32,64,128,64,32,64,128,64
490 SYMBOL 131,24,62,126,255,255,126,62,
24
500 SYMBOL 132,255,255,170,85,72,16,0,0
510 SYMBOL 133,255,170,85,170,85,170,85,
255
520 SYMBOL 1 34 , 0 , 0 , 0 , 0 , 0 , 0 ., 0 , 255
530 RETURN
540 REM DRAW BAT ON SCREEN
550 LOCATE BX,23
560 PEN 3
570 PRINT BA*5
580 RETURN
590 MC=40000
600 TA=40000+S<7F
610 TH=INT(TA/256)
620 TL=TA-256*TH
630 POKE MC,8<CD
640 POKE MC+1.&60
650
POKE MC+2,&BB
660
POKE MC+3,&32
670
POKE MC+4,TL
680
POKE MC+5,TH
690
POKE MC+6,&C9
700
RETURN
710
LOCATE XX, YY
720
CALL MC
730
DD=PEEK(TA)
129
740 RETURN
750 REM SET UP NEW BALL POSITION
760 REM CHANGE SCORE IF APPROPRIATE
770 C=X+CX:D=Y+CY
730 IF C<2 OR C>30 THEM CX=-CX: SC=SC+2: G
OTO 770
790 IF D<3 THEN CY=-CY: SC«=SC+4: CX = INT <RN
D(1)*3)--1:G0T0 770
800 IF D>23 THEN GF=0: RETURN
810 XX=C+1:YY=D+1:G0SUB 710
820 IF DD=32 THEN RETURN
830 SOUND 1,280,20,0,1
840 IF DD=132 THEN GOTO 880
850 BH=BH-1
860 SC=SC+D: LOCATE XX, YY: PRINT" " ;
870 CX=INT(RND(l>*3)-i:CY=--CY:G0T0 770
880 SC=SC+20:CY=-CY
890 CX=INT(RND(1)*3)-1
900 GOTO 770
910 RETURN
920 REM ERASE OLD BALL, PLOT NEW BALL
930 LOCATE C+l , D+l : PRINT CHR* ( 131 > ; : LOCA
TE X+1,Y+1: PRINT " "
940 X=C:Y=D
950 RETURN
960 REM MOVE BAT IF NECESSARY
970 IF INKEY(8)=0 AND BX>1 THEN BX=BX-1:
GOSUB 540
--0 AND BX<BE THEM BX=BX + 1
HAS LOST THE BALL
1, 10jPRINT"GAME OVER"
5: PEN 2s PR I NT "YOU SCORED
1030 IF SONS THEN LOCATE 1 , 18: PRINT"WHI
CH IS THE HIGH SCORE" : HS=SC: GOTO 1050
1040 LOCATE 1 , 18: PRINT "SLIGHTLY ( " ; HS-SC
;") less than ": LOCATE 1 , 20: PR I NT "the hi
gh score"
1050 LOCATE 1 , 21 : PRINT "DO YOU WANT TO PL
AY AGAIN ": LOCATE 15, 23: PRINT" ( Y/N) "
1060 I*=INKEY*
1070 IF I*<>"Y" AND I*<>"N" THEN GOTO 10
60
1080 IF I*-"Y" THEN GOTO 100
980
IF INKEY(l)
:GOS
UB 540
990
RETURN
1 000
REM PLAYER
1010
CLS: LOCATE
1020
LOCATE 1,1
: " ; S
C
130
1090 MODE 1: LOCATE 1 1 , 1 1 : PRINT" type RUN
to restart"
1100 END
TECHNICAL ARTIST
1 . I
[\
X
f . I
§*
T
If you have dreams of becoming an architect and are
interested in producing your own plans for rooms, gardens or
garages then this is the program for you.
Using this program you will be able to produce highly
accurate line drawings which you can them 'dump' onto a
printer, if you have one and hand on to a planner. You could
use this item for estimating how much carpeting you are
going to need for new rooms etc.
You can also change the colours to give you an idea of the
final effect.
How to play
To move the cursor around the screen use the ARROW keys.
To fix the end point of a line press key F.
132
To release a line and allow the cursor to move freely press key
R.
To clear the screen press Z.
To change the colour with which you are drawing press C.
You will then have to chose another colour by using digit 0 to
3 and by pressing ENTER.
The program
10 REM TECHNICAL ARTIST
20 MODE 1
30 GOSUB 390
40 PR I NT CHR$ ( & 1 7 ) ; CHR* (1)5
50 X=320:Y=200
60 FX=0
70 WINDOW #1,1,40,1,24
80 WINDOW #2,1,40,25,26
90 C0L0UR=1
100 PLOT X,Y, COLOUR
110 REM MAIN COMMAND LOOP
120 CX=0:CY=0
130 IF INKEY(0)=0 THEN CY=4
140 IF INKEY(1>=0 THEN CX=4
150 IF INKEY(2)=0 THEN CY=-4
160 IF INKEY(8>=0 THEN CX=-4
170 TX=X+CX:TY=Y+CY
180 IF TX<1 OR TX>639 THEN TX=X
190 IF TY<17 OR TY>399 THEN TY=Y
200 A*=IIMKEY*:IF A*="" THEN GOTO 260
210 IF INKEY(53)=0 THEN FX = 1 : XFI X = X : YFI X
=Y
220 IF INKEY(71)=0 THEN CLS #1:PL0T X,Y,
COLOUR
230 IF INKEY(62)=0 THEN GOSUB 450
240 IF INKEY(50)=0 THEN FX=0:PLOT X,Y,CO
LOUR
250 GOTO 110
260 REM MOVE CURSOR
270 IF FX=1 THEN GOTO 320
280 PLOT X,Y, COLOUR
133
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
PLOT TX,TY
X=TX: Y=TY
BOTO 110
REM MOVE RUBBER BAND
IF X=TX AND Y=TY THEN GOTO 110
MOVE X,Y
DRAW XFIX,YFIX, COLOUR
DRAW TX,TY
X=TX:Y=TY
GOTO 110
REM START-UP KEY DEFINITIONS
DEF 0,0
DEF 1,0
DEF 2,0
DEF 8,0
RETURN
REM CHANGE THE COLOUR SUBROUTINE
CLS #2
LOCATE 1,25
PR I NT "COLOUR :
COLOUR*="0"
A*=INKEY*
IF A*=CHR$(13)
KEY
KEY
KEY
KEY
0"
THEN
GOTO
THEN
560
GOTO 500
IF A$<"0" OR A*>"9"
COLOUR*=A*
LOCATE 9, 25: PRINT VAL ( COLOUR*)
GOTO 500
COLOUR=VAL (COLOUR*)
IF COLOUR >3 THEN GOTO 460
RETURN
SPIDER
Now here is a variation on the game of 'Frogger' which you
have probably seen on expensive tapes and in arcade games.
You have to help a spider back to it's web in the top of the
screen by moving it through waves of cars. Every time you
manage to get the spider home another wave begins so keep
your wits about you.
How to play
Use the ARROW keys to move the spider around and when
your little friend is killed off restart by pressing the SPACE bar.
135
The program
10 f
REM SPIDER
20 BORDER 13
30 (
30SUB 620
40 GOSUB 780
50 f
REM NEW PLAYER START
60 SCORE=0
70 f
REM NEW WAVE START
80 MODE 0
90 I
«JAVE=WAVE+1
1 00
TM=300
no
GOSUB 840
120
GOSUB 940
130
X=15:Y=24
140
PEN 11
150
LOCATE X,Y: PRINT CHR*(251);
160
GOSUB 1080
170
TM=TM-6
ISO
LOCATE X,Y: GOSUB 740
190
IF DD0251 AND DDO206 OR TM=0 THEM
GOTO 370
200
XX=X: YY=Y
210
IF INKEY<0)=0 THEN YY=Y~1
220
IF INKEY(1)=0 THEN XX=X+1
230
IF INKEY(2)=0 THEN YY=Y+1
240
IF INKEY(8)=0 THEN XX = X--1
250
IF X<1 OR X>20 OR Y>25 THEN GOTO 370
260
LOCATE XX, YY: GOSUB 740
270
IF DD=253 THEN GOTO 500
280
IF DDO206 AND DD0251 THEN GOTO 370
290
LOCATE X,Y
300
PEN 7
310
PRINT CHR*(206>;
320
LOCATE XX, YY
330
PEN 11
340
PRINT CHR$(251) ;
350
X=XX:Y=YY
360
GOTO 160
370
REM DEAD
380
LOCATE 4, 25: PEN 14
390
PRINT" SPLAT ! ";
400
LOCATE 3, 10
410
PRINT" SCORE : " 5 SCORE
136
420 FOR 0=300 TO 450 STEP 50
430 SOUND 1,0,50
440 SOUND 2,0+15,45
450 SOUND 0,0+30,40
460 NEXT 0
470 IF INKEY$=" " THEN GOTO 470
480 IF INKEY*<>" " THEN GOTO 480
490 GOTO 60
500 REM SPIDER HAS REACHED THE WEB
510 SCORE=SCORE+TM
520 PEN 7
530 LOCATE 10,2
540 PRINT CHR$(206) ;
550 PEN 15
560 LOCATE 10,1: PRINT CHR*(251);
570 LOCATE 5, 25: PRINT"WELL DONE"
580 LOCATE 3, 10: PR I NT" SCORE : "; SCORE
590 FOR Q=l TO 500
600 SOUND 1,0,1: NEXT 0
610 GOTO 70
620 REM MACHINE CODE
630 MEMORY &A87F
640 MO&A880
650 TA-&A8FF
660 POKE MC,&CD
670 POKE MC+l,g<60
680 POKE MC+2,?/.BB
690 POKE MC+3,&32
700 POKE MC+4,S<FF
710 POKE MC+5,&A8
720 POKE MC+6,fcC9
730 RETURN
740 REM CHECK ON SCREEN USING MACHINE CO
DE ROUTINE
750 CALL MC
760 DD=PEEK(TA)
770 RETURN
780 REM DEFINE LORRY AND SPIDER CHARACTE
RS
790 SYMBOL 250 , 0 , ?<77 , 8<22 , 8<7E , &BE , &7E , 8<22
,8<77
800 SYMBOL 251 , &24, &99, &7E,&3C, &FF, &3C, &
3C,8/5A
8 1 0 SYMBOL 252 , 0 , &E0 , &40 , 8<FE , &FF , &FE , &40
, &E0
137
820 SYMBOL 253 , 2<BD , S<42 , &BD , ?.-B5 , ?.-AD , &BD , c-
42,&BD
830 RETURN
840 REM BUILD LORRY STRINGS
850 A*=" "
860 FOR L=l TO 5
870 A*=A*+CHR* (250) +STRING* (3, CHR* (206) )
880 NEXT L
890 B*="n
900 FOR L=l TO 4
910 B*=B*+CHR*(252)+STRING*(4,CHR*(206) )
920 NEXT L
930 RETURN
940 REM FILL IN THE SCREEN
950 PEN 7
960 Q*=STRING* (20, CHR* (206) )
970 LOCATE 1,2
980 FOR L=l TO 24
990 PRINT Q*;
1000 NEXT L
1010 LOCATE 1, 1
1020 PEN 8
1030 PRINT STRING* (9, CHR* (250) ); " "SSTRI
NG*(10,CHR*(252> ) ;
1040 PEN 13
1050 LOCATE 10, 1
1060 PRINT CHR* (253) ,"
1070 RETURN
1080 REM MOVE THE LORRIES
1090 PEN 9
1100 LOCATE 1,3
1110 PRINT A*
1120 LOCATE 1,7
1130 PRINT A*
1140 LOCATE 1,11
1150 PRINT A*
1160 LOCATE 1, 15
1170 PRINT A*
1180 A*=RIGHT*(A*, 19) +LEFT* (A*, 1)
1190 PEN 7
1200 LOCATE 1,5
1210 PRINT B*
1220 LOCATE 1,9
1230 PRINT B*
1240 LOCATE 1, 13
138
1250 PRINT B$
1260 LOCATE 1, 17
1270 PRINT B*
1 280 B$=R I GHT* < B* , 1) +LEFT* ( B* , 1 9 )
1290 RETURN
DOUBLE SURROUND
Here is a game you can only play with a close friend as you will
have to sit in each others lap to play.
Each player will have the target of trying to surround his
opponent before being surrounded himself. Sounds tricky
doesn't it? Just wait until you try to play complete with some
very nasty crashing and crunching noises when you finally
collide.
Oh, by the way, if you happen to crash into your own trail it
will mean goodbye for you so keep on your toes and off your
opponents trail - and your own.
How to play
Player One uses Q and A and Z and X
Player Two uses . and , and ; and /
140
The program
10 REM DOUBLE SURROUND
20 0=3: D=3: MODE 1 : BORDER 14
30 GOSUB 560
.4.0 SYMBOL 250 , &3C , 2<3C , &D7 , &EB , &D7 , ?<EB , i
C., S<3C
50 REM NEW WAVE START
60 X1=5:Y1=12
70 X2=35:Y2=12
SO A1=1:B1=0
90 A2=-1:B2=0
100 MODE 1
110 SOUND 1,0,4,10,0,0,15
120 IF INKEY(67)=0 THEN A1=0:B1=-1
130 IF INKEY(69)=0 THEN A 1=0: B 1=1
140 IF INKEY(71)=0 THEN A1=-1:B1=0
150 IF INKEY(63)=0 THEN A1=1:B1=0
160 LOCATE X1,Y1:PEN 3: PRINT CHR*(250)
170 X1=X1+A1:Y1=Y1+B1
ISO XX=X1:YY=Y1
190 GOSUB 6S0
200 IF DD<>32 THEN GOTO 330
210 LOCATE X1,Y1:PEN 1: PR I NT CHR$(250)
220 IF INKEY(39)=0 THEN A2=~1:B2=0
230 IF INKEY<31)=0 THEN A2=1:B2=0
240 IF INKEY(30)=0 THEN A2=0:B2=1
250 IF INKEY<28>=0 THEN A2=0:B2=-1
260 LOCATE X2,Y2:PEN 3: PRINT CHR*(250)
270 X2=X2+A2:Y2=Y2+B2
280 XX=X2:YY=Y2
290 GOSUB 680
300
310
320
330
340
350
360
370
380
390
400
410
IF DD<>32 THEN GOTO 360
LOCATE X2,Y2:PEN 2: PR I NT
CHR$(250)
GOTO 110
REM PLAYER ONE CRASHED
C=C-1
D=D+1
REM PLAYER TWO CRASHED
D=D-1
FOR L=10 TO 500 STEP 35
SOUND 1,L, 30: SOUND 2,L+2<
I), 28
FOR Q=l TO 20
INK 3, INT(RND(l)*15+5)
141
420 NEXT Q
430 NEXT L.
440 INK 3,9
450 IF SQ(1)<>4 THEN GOTO 450
460 IF C*D<>0 THEN GOTO 50
470 REM SOMEONE HAS WON
480 LOCATE 9,12
490 PEN 1
500 PRINT" PLAYER ";
510 IF C=0 THEN PR I NT "TWO " 5 ELSE PRINT"
ONE "5
520 PRINT "WINS BY " ; ABS <D-C> ; "
tl M
•I
530 IF INKEY*<>"" THEN GOTO 530
540 IF INKEY*="" THEN GOTO 540
550 RUN
560 REM PUT MACHINE CODE INTO RAM
570 MEMORY &A97F
580 MO&A9B0
590 TA=&A9FF
600 POKE MC,?<CD
610 POKE MC+1.&60
,&BB
&32
&FF
&A9
S<C9
620 POKE MC+2,
630 POKE MC+3^
640 POKE MC+4,
650 POKE MC+5^
660 POKE MC+6,
670 RETURN
680 REM READ CHARACTER FROM SCREEN
690 IF XX<1 OR XX>40 OR YY< 1 OR YY>25 TH
EN DD=-1:G0T0 730
700 LOCATE XX, YY
710 CALL. MC
720 DD=PEEK(TA)
730 RETURN
SNAKER
You are in charge of a very fast growing snake which is
charging around your television screen, getting longer and
longer second by second.
Your objective is to stay alive as long as you can, before your
own body becomes too long and you run over yourself and
self destruct.
If you run off the edge of the screen, you will just pop up on the
other side and keep going, so don't try to gain any time by
taking this way out.
The longer you can stay alive the higher score you will
achieve but I'm afraid that the snake will get you into trouble
in the end.
How to play
Guide yourself around the screen using the arrow keys to
move.
143
You will be asked for your name and when you have typed it
in and pressed ENTER the game will begin. To restart the
game press the SPACE bar.
The program
10 REM SNAKER
20 GOSUB 470
30 HIGH=0
40 HS$=""
50 SYMBOL 250
C,&1B
60 SYMBOL 251
, & 1 S , &5C , 2/42 , ?.:DB , &DB , ?<42 , ?,3
?•■: 1 S , ?<5A , &-3C , &E7 , &E7 , &3C , ?••: 1
your name "Jnamel
10 OR NAME*="" THEM
GOTO 180
1: PRINT"
!HS*
LOOP
8 , 2<5A
70 REM NEW PLAYER LOOP
SO sc-o
90 MODE 1
100 LOCATE 1, 10
110 INPUT "What is
120 IF LEN(NAME*> >
TO 90
130 MODE 1
140 X=5:Y=5
150 KK=1
160 IF HIGH=0 THEN
170 LOCATE 1, l.-PEN
RE OF "5 HIGH; " BY "
180 REM MAIN PLAY
190 GOSUB 650
200 A=X:B=Y
210 KK=Q
220 IF KK=0 THEN
230 IF KK=2 THEN
240 IF KK=1 THEN
250 IF KK=S THEN
260 XX=A:YY=B
270 GOSUB 600
2S0 IF DDO-32 THEN GOTO 370
290 PEN 3
300 LOCATE X,Y: PRINT CHR*(250)
310 PEN 2
320 LOCATE A, B: PRINT CHR*(251>
330 X=A:Y=B
340 SC=SC+15
GO
HIGH SCO
B=B~1
B=B+1
A=A+1
A=A-1
IF
IF
IF
IF
B=0 THEN B=
B=26 THEN B
A=41 THEN A
A=0 THEN A=
= 1
40
144
350 SOUND 1,300,5
360 GOTO 190
370 REM THE SNAKE ATE ITSELF
330 FOR Q=10 TO 450 STEP 5
390 SOUND 1,Q,4
400 SOUND 2,0+10,3
410 INK 3, INT(RND(l>*16+4>
420 NEXT Q
430 IF SOHIGH THEN LOCATE 1 , 10: PRINT"TH
E MEW HIGH SCORE" : HIGH=SC: HS*=NAME*
440 IF INKEY*=" " THEN GOTO 440
450 IF INKEY$<>" *' THEN GOTO 450
460 GOTO 70
470 REM PUT MACHINE CODE ABOVE RAMTOP
480 MEMORY &A97F
490 MC=&A980
500 TH=&A9
510 TL=»8<FF
520 POKE MC,&CD
530 POKE MC+1,S<60
540 POKE MC+2,&BB
550 POKE MC+3,&32
560 POKE MC+4,TL
570 POKE MC+5,TH
580 POKE MC+6,2/.C9
590 RETURN
600 REM RETURN SCREEN CHARACTER
610 LOCATE XX, YY
620 CALL MC
630 DD=PEEK(?<A9FF)
640 RETURN
650 Q=KK
660 FOR L=0 TO 8
670 IF INKEY(L>=0 THEN Q=L
680 NEXT L
690 IF QOO AND Q<>1 AND Q<>2 AND QOS T
HEN Q=KK
700 RETURN
THE AMSTRAD PROGRAM BOOK
Your Amstrad computer has already been hailed by
the computer press as having 'graphics and sound
facilities superior to the Spectrum and Oric9.
To meet the demands of the Amstrad we have
produced a wide ranging selection of programs to
make full use of the colour, sound and speed available
to you.
Here are arcade style games to test your reaction
skills and mental agility as you battle with aliens from
outer space.
Adventures to make you face the dragons and
dungeons to save the princess.
Brainteasers to make you skip through minefields and
worse.
Programmers aids to help you build up your own
computing skills.
This is the AMSTRAD PROGRAM BOOK with
something for everyone.
THE AUTHOR
Peter Goode is the author of several best selling
program books including the Atari 600XL Program
Book and Memotech MTX Program Book.